Package org.jenkinsci.remoting.protocol
Interface ProtocolLayer.Send
- All Superinterfaces:
ProtocolLayer
- All Known Implementing Classes:
AckFilterLayer
,AgentProtocolClientFilterLayer
,BIONetworkLayer
,ConnectionHeadersFilterLayer
,FilterLayer
,NetworkLayer
,NIONetworkLayer
,SSLEngineFilterLayer
- Enclosing interface:
- ProtocolLayer
Interface to indicate that this layer sends data to 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 TypeMethodDescriptionvoid
Notify the lower layer that it should close.void
doSend
(ByteBuffer data) Sends data to the lower layer.boolean
Tracks if this layer is submitting data to be sent viadoSend(ByteBuffer)
.Methods inherited from interface org.jenkinsci.remoting.protocol.ProtocolLayer
init, start
-
Method Details
-
doSend
Sends data to the lower layer.- Parameters:
data
- the data to send. 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 data.
-
doCloseSend
Notify the lower layer that it should close. Callers to this method are assumed to have already calledProtocolLayer.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 viadoSend(ByteBuffer)
. Once this method returnsfalse
it must always returnfalse
and can be assumed to behave in this way.- Returns:
true
if submitting data to be sent viadoSend(ByteBuffer)
.
-