Class ContainerTransportProcessor

  • All Implemented Interfaces:
    TransportProcessor

    public class ContainerTransportProcessor
    extends java.lang.Object
    implements TransportProcessor
    The ContainerProcessor object is used to create channels which can be used to consume and process requests. This is basically an adapter to the Selector which will convert the provided transport to a usable channel. Each of the connected pipelines will end up at this object, regardless of whether those connections are SSL or plain data.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Controller controller
      This is the controller used to process the created channels.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void process​(Transport transport)
      This is used to consume HTTP messages that arrive on the given transport.
      void stop()
      This method is used to stop the connector in such a way that it will not accept and process any further messages.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • controller

        private final Controller controller
        This is the controller used to process the created channels.
    • Constructor Detail

      • ContainerTransportProcessor

        public ContainerTransportProcessor​(Container container,
                                           Allocator allocator,
                                           int count)
                                    throws java.io.IOException
        Constructor for the ContainerProcessor object. This is used to create a processor which will convert the provided transport objects to channels, which can then be processed by the controller and dispatched to the container.
        Parameters:
        container - the container to dispatch requests to
        allocator - this is the allocator used to buffer data
        count - this is the number of threads to be used
        Throws:
        java.io.IOException
      • ContainerTransportProcessor

        public ContainerTransportProcessor​(Container container,
                                           Allocator allocator,
                                           int count,
                                           int select)
                                    throws java.io.IOException
        Constructor for the ContainerProcessor object. This is used to create a processor which will convert the provided transport objects to channels, which can then be processed by the controller and dispatched to the container.
        Parameters:
        container - the container to dispatch requests to
        allocator - this is the allocator used to buffer data
        count - this is the number of threads to be used
        select - this is the number of controller threads to use
        Throws:
        java.io.IOException
    • Method Detail

      • process

        public void process​(Transport transport)
                     throws java.io.IOException
        This is used to consume HTTP messages that arrive on the given transport. All messages consumed from the transport are then handed to the Container for processing. The response will also be delivered over the provided transport. At this point the SSL handshake will have fully completed.
        Specified by:
        process in interface TransportProcessor
        Parameters:
        transport - the transport to process requests from
        Throws:
        java.io.IOException
      • stop

        public void stop()
                  throws java.io.IOException
        This method is used to stop the connector in such a way that it will not accept and process any further messages. If there are resources to clean up they may be cleaned up asynchronously so that this method can return without blocking.
        Specified by:
        stop in interface TransportProcessor
        Throws:
        java.io.IOException