| | |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | |
| | | import java.io.IOException; |
| | | import java.net.InetAddress; |
| | | import java.net.Socket; |
| | | import java.util.SortedSet; |
| | | |
| | |
| | | /** |
| | | * Create a new protocol session in the client role on the provided socket. |
| | | * |
| | | * @param serverURL |
| | | * The remote replication server to which the socket is connected. |
| | | * @param socket |
| | | * The connected socket. |
| | | * @param soTimeout |
| | |
| | | * If the protocol session could not be established for some other |
| | | * reason. |
| | | */ |
| | | public ProtocolSession createClientSession(final String serverURL, |
| | | final Socket socket, final int soTimeout) |
| | | throws ConfigException, IOException |
| | | public ProtocolSession createClientSession(final Socket socket, |
| | | final int soTimeout) throws ConfigException, IOException |
| | | { |
| | | boolean hasCompleted = false; |
| | | SSLSocket secureSocket = null; |
| | |
| | | { |
| | | // This is probably a connection attempt from an unexpected client |
| | | // log that to warn the administrator. |
| | | final InetAddress remHost = socket.getInetAddress(); |
| | | final Message message = NOTE_SSL_SERVER_CON_ATTEMPT_ERROR.get( |
| | | remHost.getHostName(), remHost.getHostAddress(), |
| | | final Message message = INFO_SSL_SERVER_CON_ATTEMPT_ERROR.get( |
| | | socket.getRemoteSocketAddress().toString(), |
| | | socket.getLocalSocketAddress().toString(), |
| | | e.getLocalizedMessage()); |
| | | logError(message); |
| | | return null; |