Interface NioServer


  • public interface NioServer
    Represents a NIO (non blocking I/O) server. Responsible for all network communication i.e. receiving requests and sending responses and supports doing these operations in a non-blocking manner.

    A typical implementation of a NioServer will handle incoming connections from clients, decode the REST protocol (usually HTTP), convert them to generic objects that the RestRequestService can understand, instantiate a NioServer specific implementation of RestResponseChannel to return responses to clients and push them down the pipeline. The NioServer should be non-blocking while receiving requests and sending responses. It should also provide methods that the downstream can use to control the flow of data towards the RestRequestService.

    • Method Detail

      • start

        void start()
            throws java.lang.InstantiationException
        Do startup tasks for the NioServer. When the function returns, startup is FULLY complete.
        Throws:
        java.lang.InstantiationException - if the NioServer is unable to start.
      • shutdown

        void shutdown()
        Do shutdown tasks for the NioServer. When the function returns, shutdown is FULLY complete.