Interface ProtocolLayer.Recv

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

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

    • onRecv

      void onRecv(@NonNull ByteBuffer data) throws IOException
      Callback on data being received from the lower layer.
      Parameters:
      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.
      Throws:
      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.
      Parameters:
      cause - the cause of the lower layer being closed or null.
      Throws:
      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.
      Returns:
      true if accepting received data via onRecv(ByteBuffer).