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 TypeMethodDescriptionboolean
Tracks if this layer is accepting received data viaonRecv(ByteBuffer)
.void
onRecv
(ByteBuffer data) Callback on data being received from the lower layer.void
onRecvClosed
(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 theByteBuffer
can be assumed as processed. Any data not consumed from theByteBuffer
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
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 returnsfalse
it must always returnfalse
and can be assumed to behave in this way.- Returns:
true
if accepting received data viaonRecv(ByteBuffer)
.
-