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 TypeMethodDescriptionvoidNotify the lower layer that it should close.voiddoSend(ByteBuffer data) Sends data to the lower layer.booleanTracks 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 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 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 returnsfalseit must always returnfalseand can be assumed to behave in this way.- Returns:
trueif submitting data to be sent viadoSend(ByteBuffer).
-