Class EPPQuicServer
- java.lang.Object
-
- com.verisign.epp.transport.server.EPPQuicServer
-
- All Implemented Interfaces:
EPPServerCon
- Direct Known Subclasses:
EPPQuicServerSingle
public class EPPQuicServer extends java.lang.Object implements EPPServerCon
SSL Server class. This class implements theEPPServerConinterface and handles SSL communication with a SSL client.
-
-
Constructor Summary
Constructors Constructor Description EPPQuicServer()Creates anEPPQuicServerthat 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 voidclose()Closing the server socketprotected java.lang.StringgetSSLPropertyListString(java.lang.String[] aList)Gets an SSL property list as a string for logging purposes.booleanisListening()Is 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 Detail
-
EPPQuicServer
public EPPQuicServer() throws EPPConExceptionCreates anEPPQuicServerthat 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-ArrayofString's.- Returns:
- Space delimited
Stringrepresenting the property list ifaListis notnull;nullotherwise
-
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:
RunServerin interfaceEPPServerCon- Parameters:
aHandler- Connection handler- Throws:
EPPConException- Error creating server socket
-
loop
public void loop() throws EPPConExceptionRun 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
public void close() throws EPPConExceptionClosing 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.
-
-