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 Details

    • setIncomingConnectionListener

      void setIncomingConnectionListener(ConnectionListener connectionListener)
      Sets the connection listener.
      Parameters:
      connectionListener - the connection listener
    • start

      void start() throws IOException
      Start the server.
      Throws:
      IOException - - if error occurred
    • stop

      void stop() throws IOException
      Stop server.
      Throws:
      IOException - - if error occurred
    • setIncomingConnectionExecutor

      void setIncomingConnectionExecutor(ExecutorService executorService)
      Set custom executor service.
      Parameters:
      executorService - the executor will be used for working with incoming connections.
    • isAbstract

      default boolean isAbstract()
    • asAbstract

      default AbstractServer asAbstract()