Class EPPSSLServer
java.lang.Object
com.verisign.epp.transport.server.EPPSSLServer
- All Implemented Interfaces:
EPPServerCon
- Direct Known Subclasses:
EPPSSLServerSingle
SSL Server class. This class implements the
EPPServerCon
interface and handles SSL communication with a SSL client.-
Constructor Summary
ConstructorsConstructorDescriptionCreates anEPPSSLServerthat initializes the SSL configuration and gets the port number to listen on. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closing the server socketprotected StringgetSSLPropertyListString(String[] aList) Gets an SSL property list as a string for logging purposes.booleanIs the server actively listening for connections?voidloop()Run the accept loop, where the server will continue listening while the listening flag istrueas defined by thegetListeningand thesetListening(boolean)methods.voidRunServer(ServerEventHandler aHandler) Starts the server by creating the SSL server socket and going into connection accept loop.voidsetListening(boolean aListening) Sets the server listing property that can be used to stop the server from listening for new connections.
-
Constructor Details
-
EPPSSLServer
Creates anEPPSSLServerthat initializes the SSL configuration and gets the port number to listen on. The server will listen on all interfaces.- Throws:
EPPConException- Error initializing SSL server
-
-
Method Details
-
getSSLPropertyListString
Gets an SSL property list as a string for logging purposes. Examples of SSL property lists include supported protocols, enabled protocols, supported cipher suites, and enabled cipher suites.- Parameters:
aList-ArrayofString's.- Returns:
- Space delimited
Stringrepresenting the property list ifaListis notnull;nullotherwise
-
RunServer
Starts the server by creating the SSL server socket and going into connection accept loop.- Specified by:
RunServerin interfaceEPPServerCon- Parameters:
aHandler- Connection handler- Throws:
EPPConException- Error creating server socket
-
loop
Run the accept loop, where the server will continue listening while the listening flag istrueas defined by thegetListeningand thesetListening(boolean)methods. Inside the loop, the server will accept a client connection and spawn a new thread to handle the connection.- Throws:
EPPConException- Any error with accepting or handling a client connection
-
close
Closing the server socket- Throws:
EPPConException- Error closing the server socket
-
isListening
public boolean isListening()Is the server actively listening for connections?- Returns:
- Listening boolean property
-
setListening
public void setListening(boolean aListening) Sets the server listing property that can be used to stop the server from listening for new connections.- Parameters:
aListening-falseto stop the server from listening to new connections.
-