Class ProtocolSession

All Implemented Interfaces:
Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle
Direct Known Subclasses:
ClientProtocolSession, ServerProtocolSession

public abstract class ProtocolSession extends ContainerLifeCycle

Represents an established stateful connection with a remote peer for a specific QUIC connection ID.

Differently from QuicSession, which is created during the initial phases of connection establishment and it is not specific to a protocol, ProtocolSession is created only when the connection is established, and it is protocol specific, depending on the protocol negotiated during the connection establishment.

See Also:
  • Constructor Details

    • ProtocolSession

      public ProtocolSession(QuicSession session)
  • Method Details

    • getQuicSession

      public QuicSession getQuicSession()
    • getIdleTimeout

      public long getIdleTimeout()
    • getMaxLocalStreams

      public int getMaxLocalStreams()
    • getProducerTask

      public abstract Runnable getProducerTask()
    • produce

      protected void produce()
    • offer

      public void offer(Runnable task, boolean dispatch)
    • getStreamEndPoint

      public QuicStreamEndPoint getStreamEndPoint(long streamId)
    • getOrCreateStreamEndPoint

      public QuicStreamEndPoint getOrCreateStreamEndPoint(long streamId, Consumer<QuicStreamEndPoint> consumer)
    • processWritableStreams

      protected void processWritableStreams()
    • onWritable

      protected void onWritable(long writableStreamId)
    • processReadableStreams

      protected boolean processReadableStreams()
    • onReadable

      protected abstract boolean onReadable(long readableStreamId)
    • openProtocolEndPoint

      public void openProtocolEndPoint(QuicStreamEndPoint endPoint)
    • onIdleTimeout

      protected boolean onIdleTimeout()
    • onFailure

      protected void onFailure(long error, String reason, Throwable failure)
    • inwardClose

      public void inwardClose(long error, String reason)
    • outwardClose

      public void outwardClose(long error, String reason)
    • shutdown

      public CompletableFuture<Void> shutdown()
    • onClose

      protected abstract void onClose(long error, String reason)
    • toString

      public String toString()
      Overrides:
      toString in class AbstractLifeCycle