| | |
| | | package org.opends.server.synchronization.plugin; |
| | | |
| | | import static org.opends.server.loggers.Error.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.synchronization.common.LogMessages.*; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | |
| | | { |
| | | if (session != null) |
| | | { |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | | ErrorLogSeverity.NOTICE, |
| | | "Broker : connect closing session" , 1); |
| | | |
| | | session.close(); |
| | | session = null; |
| | | } |
| | |
| | | try |
| | | { |
| | | SynchronizationMessage msg = session.receive(); |
| | | |
| | | if (msg instanceof WindowMessage) |
| | | { |
| | | WindowMessage windowMsg = (WindowMessage) msg; |
| | |
| | | connected = false; |
| | | try |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("ChangelogBroker Stop Closing session"); |
| | | } |
| | | |
| | | session.close(); |
| | | } catch (IOException e) |
| | | {} |
| | |
| | | { |
| | | return numLostConnections; |
| | | } |
| | | |
| | | private void log(String message) |
| | | { |
| | | int msgID = MSGID_UNKNOWN_TYPE; |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | | ErrorLogSeverity.SEVERE_ERROR, |
| | | message, msgID); |
| | | } |
| | | } |