Class ProtocolSession

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.quic.common.ProtocolSession
All Implemented Interfaces:
org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.Dumpable.DumpableContainer, org.eclipse.jetty.util.component.LifeCycle

public abstract class ProtocolSession extends org.eclipse.jetty.util.component.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:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    A factory for protocol specific instances of ProtocolSession.

    Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopException

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container

    org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable

    org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

    org.eclipse.jetty.util.component.LifeCycle.Listener
  • Field Summary

    Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    FAILED, STARTED, STARTING, STOPPED, STOPPING

    Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

    KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
    int
     
     
    abstract Runnable
     
     
    getStreamEndPoint(long streamId)
     
    void
    inwardClose(long error, String reason)
     
    void
    offer(Runnable task, boolean dispatch)
     
    protected abstract void
    onClose(long error, String reason)
     
    protected void
    onFailure(long error, String reason, Throwable failure)
     
    protected boolean
     
    protected abstract boolean
    onReadable(long readableStreamId)
     
    protected void
    onWritable(long writableStreamId)
     
    void
     
    void
    outwardClose(long error, String reason)
     
    protected boolean
     
    protected void
     
    protected void
     
     
     

    Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle

    addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans

    Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.jetty.util.component.Container

    getCachedBeans, getEventListeners

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable

    dumpSelf

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    isDumpable
  • 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 org.eclipse.jetty.util.component.AbstractLifeCycle