Class EPPSSLServer
- java.lang.Object
-
- com.verisign.epp.transport.server.EPPSSLServer
-
- All Implemented Interfaces:
EPPServerCon
- Direct Known Subclasses:
EPPSSLServerSingle
public class EPPSSLServer extends java.lang.Object implements EPPServerCon
SSL Server class. This class implements theEPPServerCon
interface and handles SSL communication with a SSL client.
-
-
Constructor Summary
Constructors Constructor Description EPPSSLServer()
Creates anEPPSSLServer
that initializes the SSL configuration and gets the port number to listen on.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closing the server socketprotected java.lang.String
getSSLPropertyListString(java.lang.String[] aList)
Gets an SSL property list as a string for logging purposes.boolean
isListening()
Is the server actively listening for connections?void
loop()
Run the accept loop, where the server will continue listening while the listening flag istrue
as defined by thegetListening
and thesetListening(boolean)
methods.void
RunServer(ServerEventHandler aHandler)
Starts the server by creating the SSL server socket and going into connection accept loop.void
setListening(boolean aListening)
Sets the server listing property that can be used to stop the server from listening for new connections.
-
-
-
Constructor Detail
-
EPPSSLServer
public EPPSSLServer() throws EPPConException
Creates anEPPSSLServer
that 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 Detail
-
getSSLPropertyListString
protected java.lang.String getSSLPropertyListString(java.lang.String[] aList)
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
-Array
ofString
's.- Returns:
- Space delimited
String
representing the property list ifaList
is notnull
;null
otherwise
-
RunServer
public void RunServer(ServerEventHandler aHandler) throws EPPConException
Starts the server by creating the SSL server socket and going into connection accept loop.- Specified by:
RunServer
in interfaceEPPServerCon
- Parameters:
aHandler
- Connection handler- Throws:
EPPConException
- Error creating server socket
-
loop
public void loop() throws EPPConException
Run the accept loop, where the server will continue listening while the listening flag istrue
as defined by thegetListening
and 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
public void close() throws EPPConException
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
-false
to stop the server from listening to new connections.
-
-