Top Description Inners Fields Constructors Methods
org.eclipse.jetty.quic.common

public abstract Class ProtocolSession

extends ContainerLifeCycle
Class Inheritance
Imports
java.util.ArrayDeque, .List, .Map, .Queue, java.util.concurrent.CompletableFuture, java.util.function.Consumer, org.eclipse.jetty.io.Connection, org.eclipse.jetty.util.component.ContainerLifeCycle, org.eclipse.jetty.util.thread.AutoLock, .ExecutionStrategy, org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy, org.slf4j.Logger, .LoggerFactory

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
QuicSession

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
ProtocolSession.Factory

A factory for protocol specific instances of ProtocolSession.

private class

Field Summary

Modifier and TypeField and Description
private static final Logger
private final ProtocolSession.StreamsProducer
private final QuicSession
private final AdaptiveExecutionStrategy

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public long
public int
public QuicStreamEndPoint
public abstract Runnable
public QuicSession
public QuicStreamEndPoint
getStreamEndPoint(long streamId)

public void
inwardClose(long error, String reason)

public 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)

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

protected boolean
protected void
protected void
public CompletableFuture<Void>
public String
toString()

Overrides org.eclipse.jetty.util.component.AbstractLifeCycle.toString.

Returns a string representation of the object.

Inherited from org.eclipse.jetty.util.component.ContainerLifeCycle:
addBeanaddBeanaddEventListeneraddManagedcontainsdestroydoStartdoStopdumpdumpdumpdumpObjectsdumpStdErrgetBeangetBeansgetBeansgetContainedBeansgetContainedBeansisAutoisManagedisUnmanagedmanageremoveBeanremoveBeansremoveEventListenersetBeansstartstopunmanageupdateBeanupdateBeanupdateBeansupdateBeans

Field Detail

LOGback to summary
private static final Logger LOG

Hides org.eclipse.jetty.util.component.ContainerLifeCycle.LOG.

producerback to summary
private final ProtocolSession.StreamsProducer producer
sessionback to summary
private final QuicSession session
strategyback to summary
private final AdaptiveExecutionStrategy strategy

Constructor Detail

ProtocolSessionback to summary
public ProtocolSession(QuicSession session)

Method Detail

getIdleTimeoutback to summary
public long getIdleTimeout()
getMaxLocalStreamsback to summary
public int getMaxLocalStreams()
getOrCreateStreamEndPointback to summary
public QuicStreamEndPoint getOrCreateStreamEndPoint(long streamId, Consumer<QuicStreamEndPoint> consumer)
getProducerTaskback to summary
public abstract Runnable getProducerTask()
getQuicSessionback to summary
public QuicSession getQuicSession()
getStreamEndPointback to summary
public QuicStreamEndPoint getStreamEndPoint(long streamId)
inwardCloseback to summary
public void inwardClose(long error, String reason)
offerback to summary
public void offer(Runnable task, boolean dispatch)
onCloseback to summary
protected abstract void onClose(long error, String reason)
onFailureback to summary
protected void onFailure(long error, String reason, Throwable failure)
onIdleTimeoutback to summary
protected boolean onIdleTimeout()
onReadableback to summary
protected abstract boolean onReadable(long readableStreamId)
onWritableback to summary
protected void onWritable(long writableStreamId)
openProtocolEndPointback to summary
public void openProtocolEndPoint(QuicStreamEndPoint endPoint)
outwardCloseback to summary
public void outwardClose(long error, String reason)
processReadableStreamsback to summary
protected boolean processReadableStreams()
processWritableStreamsback to summary
protected void processWritableStreams()
produceback to summary
protected void produce()
shutdownback to summary
public CompletableFuture<Void> shutdown()
toStringback to summary
public String toString()

Overrides org.eclipse.jetty.util.component.AbstractLifeCycle.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
org.eclipse.jetty.quic.common back to summary

public Interface ProtocolSession.Factory


A factory for protocol specific instances of ProtocolSession.

Method Summary

Modifier and TypeMethod and Description
public ProtocolSession

Method Detail

newProtocolSessionback to summary
public ProtocolSession newProtocolSession(QuicSession quicSession, Map<String, Object> context)
org.eclipse.jetty.quic.common back to summary

private Class ProtocolSession.StreamsProducer

extends Object
implements Producer
Class Inheritance
  • java.lang.Object
  • org.eclipse.jetty.quic.common.ProtocolSession.StreamsProducer
All Implemented Interfaces
org.eclipse.jetty.util.thread.ExecutionStrategy.Producer

Field Summary

Modifier and TypeField and Description
private final AutoLock
private final Queue<Runnable>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
private Runnable
poll()

public Runnable
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lockback to summary
private final AutoLock lock
tasksback to summary
private final Queue<Runnable> tasks

Constructor Detail

StreamsProducerback to summary
private StreamsProducer()

Method Detail

offerback to summary
public void offer(Runnable task)
pollback to summary
private Runnable poll()
produceback to summary
public Runnable produce()

Implements org.eclipse.jetty.util.thread.ExecutionStrategy.Producer.produce.

Doc from org.eclipse.jetty.util.thread.ExecutionStrategy.Producer.produce.

Produces a task to be executed.

Annotations
@Override