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 AbstractServer
default boolean
void
setIncomingConnectionExecutor
(ExecutorService executorService) Set custom executor service.void
setIncomingConnectionListener
(ConnectionListener connectionListener) Sets the connection listener.void
start()
Start the server.void
stop()
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
-