Class ProtocolStack.Ptr

    • Method Detail

      • doSend

        public void doSend​(ByteBuffer data)
                    throws IOException
        Each ProtocolLayer.Send should call this method to hand data for sending down the stack to the next ProtocolLayer (except for the NetworkLayer which should eat the data).
        Parameters:
        data - the data to submit to the next layer down the stack.
        Throws:
        IOException - if the next layer could not process the data.
      • isRecvOpen

        public boolean isRecvOpen()
        Checks if the next layer up the stack is open to receive data.
        Returns:
        true if the next layer up the stack is open to receive data.
      • isSendOpen

        public boolean isSendOpen()
        Checks if the next layer down the stack is open to send data.
        Returns:
        true if the next layer down the stack is open to send data.
      • doCloseSend

        public void doCloseSend()
                         throws IOException
        Requests the next layer down the stack to close output.
        Throws:
        IOException - if there was an error closing the output.
      • onRecvClosed

        public void onRecvClosed​(IOException cause)
                          throws IOException
        Notify the next layer up the stack that input has been closed.
        Parameters:
        cause - the cause of the lower layer being closed or null.
        Throws:
        IOException - if there was an error processing the close notification.