Package org.eclipse.jetty.quic.server
Class ServerQuicSession
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.quic.common.QuicSession
org.eclipse.jetty.quic.server.ServerQuicSession
- All Implemented Interfaces:
CyclicTimeouts.Expirable
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
The server specific implementation of QuicSession
.
When asked to create a QUIC stream, it creates a QuicStreamEndPoint
with an associated Connection
created from the ConnectionFactory
,
retrieved from the server Connector
, correspondent to the protocol
negotiated with the client (or the default protocol).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.quic.common.QuicSession
QuicSession.Listener
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopException
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Field Summary
-
Constructor Summary
ConstructorDescriptionServerQuicSession
(Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, org.eclipse.jetty.quic.quiche.QuicheConnection quicheConnection, ServerQuicConnection connection, SocketAddress remoteAddress, Connector connector) -
Method Summary
Modifier and TypeMethodDescriptionprotected ProtocolSession
void
flush()
long
Returns the expiration time in nanoseconds.newConnection
(QuicStreamEndPoint endPoint) boolean
process
(SocketAddress remoteAddress, ByteBuffer cipherBufferIn) void
setIdleTimeout
(long idleTimeout) protected boolean
Methods inherited from class org.eclipse.jetty.quic.common.QuicSession
doStart, doStop, dump, fill, flush, getByteBufferPool, getConnectionId, getExecutor, getIdleTimeout, getLocalAddress, getMaxLocalStreams, getNegotiatedProtocol, getOrCreateStreamEndPoint, getPeerCertificates, getProtocolSession, getQuicStreamEndPoints, getRemoteAddress, getRemoteCloseInfo, getScheduler, getWindowCapacity, getWindowCapacity, inwardClose, isConnectionEstablished, isFinished, newStreamId, onFailure, outwardClose, pollTask, remove, setConnectionId, shutdown, shutdownInput, shutdownOutput, toString
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, 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.DumpableContainer
isDumpable
-
Constructor Details
-
ServerQuicSession
public ServerQuicSession(Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, org.eclipse.jetty.quic.quiche.QuicheConnection quicheConnection, ServerQuicConnection connection, SocketAddress remoteAddress, Connector connector)
-
-
Method Details
-
getQuicConnection
- Overrides:
getQuicConnection
in classQuicSession
-
createProtocolSession
- Specified by:
createProtocolSession
in classQuicSession
-
validateNewlyEstablishedConnection
protected boolean validateNewlyEstablishedConnection()- Specified by:
validateNewlyEstablishedConnection
in classQuicSession
- Returns:
- true if the connection is valid, false otherwise.
-
newConnection
- Specified by:
newConnection
in classQuicSession
-
getExpireNanoTime
public long getExpireNanoTime()Description copied from interface:CyclicTimeouts.Expirable
Returns the expiration time in nanoseconds.
The value to return must be calculated taking into account the current nanoTime, for example:
expireNanoTime = NanoTime.now() + timeoutNanos
Returning
Long.MAX_VALUE
indicates that this entity does not expire.- Specified by:
getExpireNanoTime
in interfaceCyclicTimeouts.Expirable
- Returns:
- the expiration time in nanoseconds, or
Long.MAX_VALUE
if this entity does not expire
-
setIdleTimeout
public void setIdleTimeout(long idleTimeout) - Overrides:
setIdleTimeout
in classQuicSession
-
onIdleTimeout
public boolean onIdleTimeout()- Overrides:
onIdleTimeout
in classQuicSession
-
process
- Overrides:
process
in classQuicSession
- Throws:
IOException
-
flush
public void flush()- Overrides:
flush
in classQuicSession
-