Interface Processor

  • All Known Implementing Classes:
    ContainerProcessor

    public interface Processor
    This is the Processor used to process HTTP requests from a connected transport. This will process each request from a provided transport and pass those requests to a container. The transport provided can be either a direct transport or provide some form of secure encoding such as SSL.
    Author:
    Niall Gallagher
    See Also:
    Transport
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void process​(Transport transport)
      This is used to process the requests from a provided transport and deliver a response to those requests.
      void stop()
      This method is used to stop the Processor such that it will accept no more pipelines.
    • Method Detail

      • process

        void process​(Transport transport)
              throws java.io.IOException
        This is used to process the requests from a provided transport and deliver a response to those requests. A transport can be a direct transport or a secure transport providing SSL.

        Typical usage of this method is to accept multiple transport objects, each representing a unique HTTP channel to the client, and process requests from those transports concurrently.

        Parameters:
        transport - the transport to process requests from
        Throws:
        java.io.IOException
      • stop

        void stop()
           throws java.io.IOException
        This method is used to stop the Processor such that it will accept no more pipelines. Stopping the processor ensures that all resources occupied will be released. This is required so that all threads are stopped and released.

        Typically this method is called once all connections to the server have been stopped. As a final act of shutting down the entire server all threads must be stopped, this allows collection of unused memory and the closing of file and socket resources.

        Throws:
        java.io.IOException