Package org.jenkinsci.remoting.protocol
Interface ProtocolLayer
-
- All Known Subinterfaces:
ProtocolLayer.Recv
,ProtocolLayer.Send
- All Known Implementing Classes:
AckFilterLayer
,AgentProtocolClientFilterLayer
,ApplicationLayer
,BIONetworkLayer
,ChannelApplicationLayer
,ConnectionHeadersFilterLayer
,FilterLayer
,NetworkLayer
,NIONetworkLayer
,SSLEngineFilterLayer
public interface ProtocolLayer
A networkProtocolStack
consists of a number ofProtocolLayer
s. This interface represents the general contract of all layers in the stack.- Since:
- 3.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ProtocolLayer.Recv
Interface to indicate that this layer receives data from lower layers.static interface
ProtocolLayer.Send
Interface to indicate that this layer sends data to lower layers.
-
Field Summary
Fields Modifier and Type Field Description static ByteBuffer
EMPTY_BUFFER
A handy constant to use for no-op send/receive calls.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
init(ProtocolStack.Ptr ptr)
Initializes the layer with itsProtocolStack.Ptr
.void
start()
Starts this layer.
-
-
-
Field Detail
-
EMPTY_BUFFER
static final ByteBuffer EMPTY_BUFFER
A handy constant to use for no-op send/receive calls.
-
-
Method Detail
-
init
void init(@NonNull ProtocolStack.Ptr ptr) throws IOException
Initializes the layer with itsProtocolStack.Ptr
. All lower layers in the stack will be initialized before a call to this method. All layers in a stack will be initialized before a call tostart()
.- Parameters:
ptr
- the position of this layer in the stack.- Throws:
IOException
- if something goes wrong.
-
start
void start() throws IOException
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.- Throws:
IOException
- if something goes wrong.
-
-