Interface ProtocolLayer.Recv

All Superinterfaces:
All Known Implementing Classes:
AckFilterLayer, AgentProtocolClientFilterLayer, ApplicationLayer, ChannelApplicationLayer, ConnectionHeadersFilterLayer, FilterLayer, SSLEngineFilterLayer
Enclosing interface:

public static interface ProtocolLayer.Recv extends ProtocolLayer
Interface to indicate that this layer receives data from lower layers.
  • Method Details

    • onRecv

      void onRecv(@NonNull ByteBuffer data) throws IOException
      Callback on data being received from the lower layer.
      data - the data received. Any data consumed from the ByteBuffer can be assumed as processed. Any data not consumed from the ByteBuffer will be the responsibility of the caller to resubmit in subsequent calls.
      IOException - if there was an error during processing of the received data.
    • onRecvClosed

      void onRecvClosed(@CheckForNull IOException cause) throws IOException
      Callback on the lower layer's source of data being closed.
      cause - the cause of the lower layer being closed or null.
      IOException - if there was an error during the processing of the close notification.
    • isRecvOpen

      boolean isRecvOpen()
      Tracks if this layer is accepting received data via onRecv(ByteBuffer). Once this method returns false it must always return false and can be assumed to behave in this way.
      true if accepting received data via onRecv(ByteBuffer).