Class AgentProtocolClientFilterLayer
java.lang.Object
org.jenkinsci.remoting.protocol.FilterLayer
org.jenkinsci.remoting.protocol.impl.AgentProtocolClientFilterLayer
- All Implemented Interfaces:
ProtocolLayer,ProtocolLayer.Recv,ProtocolLayer.Send
A
FilterLayer that sends the AgentProtocol client handshake.- 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoSend(ByteBuffer data) SPI: Sends data to the lower layer.voidonRecv(ByteBuffer data) SPI: Callback on data being received from the lower layer.voidstart()Starts this layer.Methods inherited from class org.jenkinsci.remoting.protocol.FilterLayer
abort, completed, doCloseSend, flushRecv, flushSend, init, isRecvOpen, isSendOpen, next, onRecvClosed, stack
-
Constructor Details
-
AgentProtocolClientFilterLayer
Constructor- Parameters:
name- theAgentProtocol.getName().
-
-
Method Details
-
start
Starts this layer. All layers in the stack will be initialized before a call to this method. All lower layers in the stack will have been started before this layer is started.- Specified by:
startin interfaceProtocolLayer- Overrides:
startin classFilterLayer- Throws:
IOException- if something goes wrong.
-
onRecv
SPI: Callback on data being received from the lower layer.- Specified by:
onRecvin interfaceProtocolLayer.Recv- Specified by:
onRecvin classFilterLayer- 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.
-
doSend
SPI: Sends data to the lower layer.- Specified by:
doSendin interfaceProtocolLayer.Send- Specified by:
doSendin classFilterLayer- 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.
-