Package com.epam.common.transport.server
Interface Server
- All Known Implementing Classes:
AbstractServer,NIOTCPServer,SSLTCPServer,TCPServer
public interface Server
The common server interface.
Provides ability to start and stop operation and listen the incoming connections.
-
Method Summary
Modifier and TypeMethodDescriptiondefault AbstractServerdefault booleanvoidsetIncomingConnectionExecutor(ExecutorService executorService) Set custom executor service.voidsetIncomingConnectionListener(ConnectionListener connectionListener) Sets the connection listener.voidstart()Start the server.voidstop()Stop server.
-
Method Details
-
setIncomingConnectionListener
Sets the connection listener.- Parameters:
connectionListener- the connection listener
-
start
Start the server.- Throws:
IOException- - if error occurred
-
stop
Stop server.- Throws:
IOException- - if error occurred
-
setIncomingConnectionExecutor
Set custom executor service.- Parameters:
executorService- the executor will be used for working with incoming connections.
-
isAbstract
default boolean isAbstract() -
asAbstract
-