Class HTTP2ServerConnection
java.lang.Object
org.eclipse.jetty.io.AbstractConnection
org.eclipse.jetty.http2.HTTP2Connection
org.eclipse.jetty.http2.server.internal.HTTP2ServerConnection
- All Implemented Interfaces:
Closeable,AutoCloseable,Parser.Listener,ServerParser.Listener,Connection,Connection.UpgradeTo,ConnectionMetaData,Attributes,Invocable
public class HTTP2ServerConnection
extends HTTP2Connection
implements ConnectionMetaData, ServerParser.Listener
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.http2.HTTP2Connection
HTTP2Connection.HTTP2ProducerNested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
Attributes.Layer, Attributes.Lazy, Attributes.Mapped, Attributes.SyntheticNested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeToNested classes/interfaces inherited from interface org.eclipse.jetty.server.ConnectionMetaData
ConnectionMetaData.WrapperNested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.TaskNested classes/interfaces inherited from interface org.eclipse.jetty.http2.parser.Parser.Listener
Parser.Listener.WrapperNested classes/interfaces inherited from interface org.eclipse.jetty.http2.parser.ServerParser.Listener
ServerParser.Listener.Wrapper -
Field Summary
Fields inherited from interface org.eclipse.jetty.util.Attributes
NULLFields inherited from interface org.eclipse.jetty.util.thread.Invocable
__nonBlocking, NOOP -
Constructor Summary
ConstructorsConstructorDescriptionHTTP2ServerConnection(Connector connector, EndPoint endPoint, HttpConfiguration httpConfig, HTTP2ServerSession session, int inputBufferSize, ServerSessionListener listener) -
Method Summary
Modifier and TypeMethodDescriptionvoidClear all attribute namesgetAttribute(String name) Get an attributeGet the immutable set of attribute names.getId()booleanbooleanbooleanvoidonDataAvailable(Stream stream) voidonNewStream(HTTP2Stream stream, HeadersFrame frame) voidonOpen()Callback method invoked when this connection is opened.voidvoidonSessionFailure(Throwable failure, Callback callback) booleanonSessionTimeout(Throwable failure) voidonStreamFailure(Stream stream, Throwable failure, Callback callback) voidonStreamTimeout(Stream stream, TimeoutException timeout, Promise<Boolean> promise) voidonTrailers(Stream stream, HeadersFrame frame) voidpush(HTTP2Stream stream, MetaData.Request request) removeAttribute(String name) Remove an attributesetAttribute(String name, Object attribute) Set an attributevoidsetRecycleHttpChannels(boolean recycleHttpChannels) booleanupgrade(MetaData.Request request, HttpFields.Mutable responseFields) Methods inherited from class org.eclipse.jetty.http2.HTTP2Connection
close, dispatch, getBytesIn, getBytesOut, getMessagesIn, getMessagesOut, isUseInputDirectByteBuffers, isUseOutputDirectByteBuffers, offerTask, onClose, onConnectionFailure, onData, onFillable, onGoAway, onHeaders, onIdleExpired, onPing, onPriority, onPushPromise, onReset, onSettings, onStreamFailure, onUpgradeTo, onWindowUpdate, produce, setUseInputDirectByteBuffers, setUseOutputDirectByteBuffersMethods inherited from class org.eclipse.jetty.io.AbstractConnection
addEventListener, failedCallback, fillInterested, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getInvocationType, isFillInterested, onFillInterestedFailed, onReadTimeout, removeEventListener, setInputBufferSize, toConnectionString, toString, tryFillInterestedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.Attributes
asAttributeMap, equals, hashCodeMethods inherited from interface org.eclipse.jetty.server.ConnectionMetaData
getServerAuthority, isSecureMethods inherited from interface org.eclipse.jetty.http2.parser.Parser.Listener
onConnectionFailure, onData, onGoAway, onHeaders, onPing, onPriority, onPushPromise, onReset, onSettings, onStreamFailure, onWindowUpdate
-
Constructor Details
-
HTTP2ServerConnection
public HTTP2ServerConnection(Connector connector, EndPoint endPoint, HttpConfiguration httpConfig, HTTP2ServerSession session, int inputBufferSize, ServerSessionListener listener)
-
-
Method Details
-
isRecycleHttpChannels
public boolean isRecycleHttpChannels() -
setRecycleHttpChannels
public void setRecycleHttpChannels(boolean recycleHttpChannels) -
getSession
- Overrides:
getSessionin classHTTP2Connection
-
onOpen
public void onOpen()Description copied from interface:ConnectionCallback method invoked when this connection is opened.
Creators of the connection implementation are responsible for calling this method.
- Specified by:
onOpenin interfaceConnection- Overrides:
onOpenin classHTTP2Connection
-
onPreface
public void onPreface()- Specified by:
onPrefacein interfaceServerParser.Listener
-
onNewStream
-
onDataAvailable
-
onTrailers
-
onStreamTimeout
-
onStreamFailure
-
onSessionTimeout
-
onSessionFailure
-
push
-
upgrade
-
getId
- Specified by:
getIdin interfaceConnectionMetaData- Returns:
- a unique (within the lifetime of the JVM) identifier string for the network connection to the JVM
-
getHttpConfiguration
- Specified by:
getHttpConfigurationin interfaceConnectionMetaData
-
getHttpVersion
- Specified by:
getHttpVersionin interfaceConnectionMetaData
-
getProtocol
- Specified by:
getProtocolin interfaceConnectionMetaData
-
getConnection
- Specified by:
getConnectionin interfaceConnectionMetaData
-
getConnector
- Specified by:
getConnectorin interfaceConnectionMetaData
-
isPersistent
public boolean isPersistent()- Specified by:
isPersistentin interfaceConnectionMetaData
-
isPushSupported
public boolean isPushSupported()- Specified by:
isPushSupportedin interfaceConnectionMetaData- Returns:
- whether the functionality of pushing resources is supported
-
getRemoteSocketAddress
- Specified by:
getRemoteSocketAddressin interfaceConnectionMetaData- Returns:
- The address of the remote end of this connection. By default, this is the first hop of the underlying network connection, but it may be wrapped to represent a more remote end point.
-
getLocalSocketAddress
- Specified by:
getLocalSocketAddressin interfaceConnectionMetaData- Returns:
- The address of the local end of this connection. By default, this is the address of the underlying network connection, but it may be wrapped if the deployment wishes to hide all local details.
-
getAttribute
Description copied from interface:AttributesGet an attribute- Specified by:
getAttributein interfaceAttributes- Parameters:
name- the attribute to get- Returns:
- the value of the attribute, or
nullif no such attribute exists
-
setAttribute
Description copied from interface:AttributesSet an attribute- Specified by:
setAttributein interfaceAttributes- Parameters:
name- the attribute to setattribute- the value to set. A null value is equivalent to removing the attribute.- Returns:
- the previous value of the attribute if set, else
null
-
removeAttribute
Description copied from interface:AttributesRemove an attribute- Specified by:
removeAttributein interfaceAttributes- Parameters:
name- the attribute to remove- Returns:
- the value of the attribute if removed, else
null
-
getAttributeNameSet
Description copied from interface:AttributesGet the immutable set of attribute names.- Specified by:
getAttributeNameSetin interfaceAttributes- Returns:
- Set of attribute names, or an empty set if there are no attributes.
-
clearAttributes
public void clearAttributes()Description copied from interface:AttributesClear all attribute names- Specified by:
clearAttributesin interfaceAttributes
-