Package org.jenkinsci.remoting.protocol
Interface ProtocolLayer.Recv
- All Superinterfaces:
ProtocolLayer
- All Known Implementing Classes:
AckFilterLayer,AgentProtocolClientFilterLayer,ApplicationLayer,ChannelApplicationLayer,ConnectionHeadersFilterLayer,FilterLayer,SSLEngineFilterLayer
- Enclosing interface:
ProtocolLayer
Interface to indicate that this layer receives data from lower layers.
- Since:
- 3.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jenkinsci.remoting.protocol.ProtocolLayer
ProtocolLayer.Recv, ProtocolLayer.Send -
Field Summary
Fields inherited from interface org.jenkinsci.remoting.protocol.ProtocolLayer
EMPTY_BUFFER -
Method Summary
Modifier and TypeMethodDescriptionbooleanTracks if this layer is accepting received data viaonRecv(ByteBuffer).voidonRecv(ByteBuffer data) Callback on data being received from the lower layer.voidonRecvClosed(IOException cause) Callback on the lower layer's source of data being closed.Methods inherited from interface org.jenkinsci.remoting.protocol.ProtocolLayer
init, start
-
Method Details
-
onRecv
Callback on data being received from the lower layer.- Parameters:
data- the data received. Any data consumed from theByteBuffercan be assumed as processed. Any data not consumed from theByteBufferwill 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
Callback on the lower layer's source of data being closed.- Parameters:
cause- the cause of the lower layer being closed ornull.- 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 viaonRecv(ByteBuffer). Once this method returnsfalseit must always returnfalseand can be assumed to behave in this way.- Returns:
trueif accepting received data viaonRecv(ByteBuffer).
-