Class InboundWay

    • Field Detail

      • builderIndex

        private volatile int builderIndex
        Deprecated.
        The line builder index.
      • entityRegistration

        private volatile SelectionRegistration entityRegistration
        Deprecated.
        The NIO selection registration of the entity.
    • Constructor Detail

      • InboundWay

        public InboundWay​(Connection<?> connection,
                          int bufferSize)
        Deprecated.
        Constructor.
        Parameters:
        connection - The parent connection.
        bufferSize - The byte buffer size.
    • Method Detail

      • clear

        public void clear()
        Deprecated.
        Description copied from class: Way
        Recycles the way so it can be reused. Typically invoked by a connection pool.
        Overrides:
        clear in class Way
      • createEntity

        protected Representation createEntity​(Series<Header> headers)
        Deprecated.
        Returns the message entity if available.
        Parameters:
        headers - The headers to use.
        Returns:
        The inbound message if available.
      • fillLine

        protected boolean fillLine()
                            throws java.io.IOException
        Deprecated.
        Read the current message line (start line or header line).
        Returns:
        True if the line is ready for reading.
        Throws:
        java.io.IOException
      • getBuilderIndex

        protected int getBuilderIndex()
        Deprecated.
        Returns the line builder index.
        Returns:
        The line builder index.
      • getEntityRegistration

        protected SelectionRegistration getEntityRegistration()
        Deprecated.
        Returns the NIO selection registration of the entity.
        Returns:
        The NIO selection registration of the entity.
      • getInterestOperations

        public int getInterestOperations()
        Deprecated.
        Description copied from class: Way
        Returns the operations of interest.
        Specified by:
        getInterestOperations in class Way
        Returns:
        The operations of interest.
      • isLineReadable

        protected boolean isLineReadable()
                                  throws java.io.IOException
        Deprecated.
        Indicates if the next message line is readable.
        Returns:
        True if the next message line is readable.
        Throws:
        java.io.IOException
      • onDrain

        public int onDrain​(Buffer buffer,
                           int maxDrained,
                           java.lang.Object... args)
                    throws java.io.IOException
        Deprecated.
        Description copied from class: Way
        Drains the byte buffer by writing available bytes to the socket channel.
        Specified by:
        onDrain in interface BufferProcessor
        Specified by:
        onDrain in class Way
        Parameters:
        buffer - The IO buffer to drain.
        maxDrained - The maximum number of bytes drained by this call.
        args - The optional arguments to pass back to the callbacks.
        Returns:
        The number of bytes drained.
        Throws:
        java.io.IOException
      • onError

        public void onError​(Status status)
        Deprecated.
        Description copied from class: Way
        Called on error.
        Specified by:
        onError in class Way
        Parameters:
        status - The error status.
      • onFill

        public int onFill​(Buffer buffer,
                          java.lang.Object... args)
                   throws java.io.IOException
        Deprecated.
        Description copied from class: Way
        Fills the byte buffer by writing the current message.
        Specified by:
        onFill in interface BufferProcessor
        Specified by:
        onFill in class Way
        Parameters:
        buffer - The IO buffer to drain.
        args - The optional arguments to pass back to the callbacks.
        Returns:
        The number of bytes filled.
        Throws:
        java.io.IOException
      • onFillEof

        public void onFillEof()
        Deprecated.
        Called back when a fill operation returns with an EOF status.
      • onHeadersCompleted

        protected void onHeadersCompleted()
                                   throws java.io.IOException
        Deprecated.
        Callback invoked when a message has been received. Note that only the start line and the headers must have been received, not the optional body.
        Specified by:
        onHeadersCompleted in class Way
        Throws:
        java.io.IOException
      • onMessageCompleted

        public void onMessageCompleted​(boolean endDetected)
                                throws java.io.IOException
        Deprecated.
        Description copied from class: Way
        Callback method invoked when the current message has been completely received or sent.
        Specified by:
        onMessageCompleted in interface CompletionListener
        Overrides:
        onMessageCompleted in class Way
        Parameters:
        endDetected - Indicates if the end of the socket channel was detected.
        Throws:
        java.io.IOException
      • onPostProcessing

        protected void onPostProcessing()
        Deprecated.
        Description copied from class: Way
        Called back after the IO processing to indicate if there is further IO interest. By default, it sets the IO state to IoState.INTEREST.
        Specified by:
        onPostProcessing in class Way
      • onReceived

        protected abstract void onReceived​(Response message)
                                    throws java.io.IOException
        Deprecated.
        Call back invoked when the message is received.
        Parameters:
        message - The new message received.
        Throws:
        java.io.IOException
      • onTimeOut

        public void onTimeOut()
        Deprecated.
        Description copied from class: Way
        Called back by the controller when an IO time out has been detected.
        Specified by:
        onTimeOut in class Way
      • processIoBuffer

        public int processIoBuffer()
                            throws java.io.IOException
        Deprecated.
        Description copied from class: Way
        Processes the IO buffer by filling and draining it.
        Overrides:
        processIoBuffer in class Way
        Throws:
        java.io.IOException
      • readHeader

        protected Header readHeader()
                             throws java.io.IOException
        Deprecated.
        Read a message header.
        Returns:
        The new message header or null.
        Throws:
        java.io.IOException
      • readStartLine

        protected abstract void readStartLine()
                                       throws java.io.IOException
        Deprecated.
        Read the start line of the current message received.
        Throws:
        java.io.IOException
      • setBuilderIndex

        protected void setBuilderIndex​(int builderIndex)
        Deprecated.
        Sets the line builder index.
        Parameters:
        builderIndex - The line builder index.
      • setEntityRegistration

        protected void setEntityRegistration​(SelectionRegistration entityRegistration)
        Deprecated.
        Sets the NIO selection registration of the entity.
        Parameters:
        entityRegistration - The NIO selection registration of the entity.
      • updateState

        public void updateState()
        Deprecated.
        Description copied from class: Way
        Updates the way IO and message states.
        Overrides:
        updateState in class Way