Interface ProtocolLayer.Send

All Superinterfaces:
ProtocolLayer
All Known Implementing Classes:
AckFilterLayer, AgentProtocolClientFilterLayer, BIONetworkLayer, ConnectionHeadersFilterLayer, FilterLayer, NetworkLayer, NIONetworkLayer, SSLEngineFilterLayer
Enclosing interface:
ProtocolLayer

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

    • doSend

      void doSend(@NonNull ByteBuffer data) throws IOException
      Sends data to the lower layer.
      Parameters:
      data - the data to send. 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 data.
    • doCloseSend

      void doCloseSend() throws IOException
      Notify the lower layer that it should close. Callers to this method are assumed to have already called ProtocolLayer.Recv.onRecvClosed(IOException) for any upper layers.
      Throws:
      IOException - if there was an error closing the lower layer.
    • isSendOpen

      boolean isSendOpen()
      Tracks if this layer is submitting data to be sent via doSend(ByteBuffer). Once this method returns false it must always return false and can be assumed to behave in this way.
      Returns:
      true if submitting data to be sent via doSend(ByteBuffer).