- All Superinterfaces:
- All Known Implementing Classes:
- Enclosing interface:
public static interface ProtocolLayer.Recv extends ProtocolLayerInterface to indicate that this layer receives data from lower layers.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
isRecvOpen()Tracks if this layer is accepting received data via
onRecv(ByteBuffer data)Callback on data being received from the lower layer.
onRecvClosed(IOException cause)Callback on the lower layer's source of data being closed.
void onRecv(@NonNull ByteBuffer data) throws IOExceptionCallback on data being received from the lower layer.
data- the data received. Any data consumed from the
ByteBuffercan be assumed as processed. Any data not consumed from the
ByteBufferwill be the responsibility of the caller to resubmit in subsequent calls.
IOException- if there was an error during processing of the received data.
void onRecvClosed(@CheckForNull IOException cause) throws IOExceptionCallback on the lower layer's source of data being closed.
cause- the cause of the lower layer being closed or
IOException- if there was an error during the processing of the close notification.