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 network ProtocolStack consists of a number of ProtocolLayers. 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 
    Interface to indicate that this layer receives data from lower layers.
    static interface 
    Interface to indicate that this layer sends data to lower layers.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ByteBuffer
    A handy constant to use for no-op send/receive calls.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Initializes the layer with its ProtocolStack.Ptr.
    void
    Starts this layer.
  • Field Details

    • EMPTY_BUFFER

      static final ByteBuffer EMPTY_BUFFER
      A handy constant to use for no-op send/receive calls.
  • Method Details

    • init

      void init(@NonNull ProtocolStack<?>.Ptr ptr) throws IOException
      Initializes the layer with its ProtocolStack.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 to start().
      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.