Top Fields Constructors Methods
org.eclipse.jetty.http2.server.internal

public Class HTTP2ServerConnection

extends HTTP2Connection
implements ConnectionMetaData, Listener
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.http2.parser.ServerParser.Listener, org.eclipse.jetty.http2.parser.Parser.Listener, org.eclipse.jetty.server.ConnectionMetaData, org.eclipse.jetty.util.Attributes
Imports
java.net.SocketAddress, java.util.ArrayList, .Base64, .List, .Objects, .Queue, .Set, java.util.concurrent.ConcurrentLinkedQueue, .TimeoutException, org.eclipse.jetty.http.BadMessageException, .HttpField, .HttpFields, .HttpHeader, .HttpMethod, .HttpVersion, .MetaData, .MetaData.Request, org.eclipse.jetty.http2.HTTP2Channel, .HTTP2Connection, .HTTP2Session, .HTTP2Stream, org.eclipse.jetty.http2.api.Stream, org.eclipse.jetty.http2.api.server.ServerSessionListener, org.eclipse.jetty.http2.frames.Frame, .HeadersFrame, .PrefaceFrame, .SettingsFrame, org.eclipse.jetty.http2.parser.ServerParser, .SettingsBodyParser, org.eclipse.jetty.io.Connection, .EndPoint, org.eclipse.jetty.server.ConnectionMetaData, .Connector, .HttpChannel, .HttpConfiguration, org.eclipse.jetty.util.Attributes, .BufferUtil, .Callback, .Promise, .StringUtil, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final Attributes
private final Connector
private final HttpChannel.Factory
private final Queue<HttpChannel>
private final HttpConfiguration
private final String
private final ServerSessionListener
private final SocketAddress
private static final Logger
private boolean
private final SocketAddress
private final List<Frame>

Constructor Summary

AccessConstructor and Description
public
HTTP2ServerConnection(Connector connector, EndPoint endPoint, HttpConfiguration httpConfig, HTTP2ServerSession session, int inputBufferSize, ServerSessionListener listener)

Method Summary

Modifier and TypeMethod and Description
public void
clearAttributes()

Overrides default org.eclipse.jetty.util.Attributes.clearAttributes.

Clear all attribute names

public Object
getAttribute(String
the attribute to get
name
)

Implements org.eclipse.jetty.util.Attributes.getAttribute.

Get an attribute

public Set<String>
getAttributeNameSet()

Implements org.eclipse.jetty.util.Attributes.getAttributeNameSet.

Get the immutable set of attribute names.

public Connection
public Connector
public HttpConfiguration
public HttpVersion
public String
public SocketAddress
public String
public SocketAddress
public HTTP2ServerSession
public boolean
public boolean
public boolean
private void
pack-priv void
protected void
public void
public void
public void
onOpen()

Overrides org.eclipse.jetty.http2.HTTP2Connection.onOpen.

Implements org.eclipse.jetty.io.Connection.onOpen.

Callback method invoked when this connection is opened.

public void
public void
onSessionFailure(Throwable failure, Callback callback)

public boolean
public void
onStreamFailure(Stream stream, Throwable failure, Callback callback)

public void
public void
private HttpChannel
public void
push(HTTP2Stream stream, MetaData.Request request)

public Object
removeAttribute(String
the attribute to remove
name
)

Implements org.eclipse.jetty.util.Attributes.removeAttribute.

Remove an attribute

public Object
setAttribute(String
the attribute to set
name
,
Object
the value to set. A null value is equivalent to removing the attribute.
attribute
)

Implements org.eclipse.jetty.util.Attributes.setAttribute.

Set an attribute

public void
setRecycleHttpChannels(boolean recycleHttpChannels)

public boolean
upgrade(MetaData.Request request, HttpFields.Mutable responseFields)

Inherited from org.eclipse.jetty.http2.HTTP2Connection:
closedispatchgetBytesIngetBytesOutgetMessagesIngetMessagesOutisUseInputDirectByteBuffersisUseOutputDirectByteBuffersonCloseonConnectionFailureonDataonFillableonFlushedonGoAwayonHeadersonIdleExpiredonPingonPriorityonPushPromiseonResetonSettingsonStreamFailureonUpgradeToonWindowUpdateproducesetUseInputDirectByteBufferssetUseOutputDirectByteBuffers

Field Detail

attributesback to summary
private final Attributes attributes
connectorback to summary
private final Connector connector
httpChannelFactoryback to summary
private final HttpChannel.Factory httpChannelFactory
httpChannelsback to summary
private final Queue<HttpChannel> httpChannels
httpConfigback to summary
private final HttpConfiguration httpConfig
idback to summary
private final String id
listenerback to summary
private final ServerSessionListener listener
localSocketAddressback to summary
private final SocketAddress localSocketAddress
LOGback to summary
private static final Logger LOG

Hides org.eclipse.jetty.http2.HTTP2Connection.LOG.

recycleHttpChannelsback to summary
private boolean recycleHttpChannels
remoteSocketAddressback to summary
private final SocketAddress remoteSocketAddress
upgradeFramesback to summary
private final List<Frame> upgradeFrames

Constructor Detail

HTTP2ServerConnectionback to summary
public HTTP2ServerConnection(Connector connector, EndPoint endPoint, HttpConfiguration httpConfig, HTTP2ServerSession session, int inputBufferSize, ServerSessionListener listener)

Method Detail

clearAttributesback to summary
public void clearAttributes()

Overrides default org.eclipse.jetty.util.Attributes.clearAttributes.

Doc from org.eclipse.jetty.util.Attributes.clearAttributes.

Clear all attribute names

Annotations
@Override
getAttributeback to summary
public Object getAttribute(String name)

Implements org.eclipse.jetty.util.Attributes.getAttribute.

Doc from org.eclipse.jetty.util.Attributes.getAttribute.

Get an attribute

Parameters
name:String

the attribute to get

Returns:Object

the value of the attribute

Annotations
@Override
getAttributeNameSetback to summary
public Set<String> getAttributeNameSet()

Implements org.eclipse.jetty.util.Attributes.getAttributeNameSet.

Doc from org.eclipse.jetty.util.Attributes.getAttributeNameSet.

Get the immutable set of attribute names.

Returns:Set<String>

Set of attribute names

Annotations
@Override
getConnectionback to summary
public Connection getConnection()

Implements org.eclipse.jetty.server.ConnectionMetaData.getConnection.

Annotations
@Override
getConnectorback to summary
public Connector getConnector()

Implements org.eclipse.jetty.server.ConnectionMetaData.getConnector.

Annotations
@Override
getHttpConfigurationback to summary
public HttpConfiguration getHttpConfiguration()

Implements org.eclipse.jetty.server.ConnectionMetaData.getHttpConfiguration.

Annotations
@Override
getHttpVersionback to summary
public HttpVersion getHttpVersion()

Implements org.eclipse.jetty.server.ConnectionMetaData.getHttpVersion.

Annotations
@Override
getIdback to summary
public String getId()

Implements org.eclipse.jetty.server.ConnectionMetaData.getId.

Returns:String

Doc from org.eclipse.jetty.server.ConnectionMetaData.getId.

a unique (within the lifetime of the JVM) identifier string for the network connection to the JVM

Annotations
@Override
getLocalSocketAddressback to summary
public SocketAddress getLocalSocketAddress()

Implements org.eclipse.jetty.server.ConnectionMetaData.getLocalSocketAddress.

Returns:SocketAddress

Doc from org.eclipse.jetty.server.ConnectionMetaData.getLocalSocketAddress.

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.

Annotations
@Override
getProtocolback to summary
public String getProtocol()

Implements org.eclipse.jetty.server.ConnectionMetaData.getProtocol.

Annotations
@Override
getRemoteSocketAddressback to summary
public SocketAddress getRemoteSocketAddress()

Implements org.eclipse.jetty.server.ConnectionMetaData.getRemoteSocketAddress.

Returns:SocketAddress

Doc from org.eclipse.jetty.server.ConnectionMetaData.getRemoteSocketAddress.

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.

Annotations
@Override
getSessionback to summary
public HTTP2ServerSession getSession()

Overrides org.eclipse.jetty.http2.HTTP2Connection.getSession.

Annotations
@Override
isPersistentback to summary
public boolean isPersistent()

Implements org.eclipse.jetty.server.ConnectionMetaData.isPersistent.

Annotations
@Override
isPushSupportedback to summary
public boolean isPushSupported()

Overrides default org.eclipse.jetty.server.ConnectionMetaData.isPushSupported.

Returns:boolean

Doc from org.eclipse.jetty.server.ConnectionMetaData.isPushSupported.

whether the functionality of pushing resources is supported

Annotations
@Override
isRecycleHttpChannelsback to summary
public boolean isRecycleHttpChannels()
notifyAcceptback to summary
private void notifyAccept(HTTP2Session session)
offerHttpChannelback to summary
pack-priv void offerHttpChannel(HttpChannel channel)
offerTaskback to summary
protected void offerTask(Runnable task, boolean dispatch)

Overrides org.eclipse.jetty.http2.HTTP2Connection.offerTask.

Annotations
@Override
onDataAvailableback to summary
public void onDataAvailable(Stream stream)
onNewStreamback to summary
public void onNewStream(HTTP2Stream stream, HeadersFrame frame)
onOpenback to summary
public void onOpen()

Overrides org.eclipse.jetty.http2.HTTP2Connection.onOpen.

Implements org.eclipse.jetty.io.Connection.onOpen.

Doc from org.eclipse.jetty.io.Connection.onOpen.

Callback method invoked when this connection is opened.

Creators of the connection implementation are responsible for calling this method.

Annotations
@Override
onPrefaceback to summary
public void onPreface()

Overrides default org.eclipse.jetty.http2.parser.ServerParser.Listener.onPreface.

Annotations
@Override
onSessionFailureback to summary
public void onSessionFailure(Throwable failure, Callback callback)
onSessionTimeoutback to summary
public boolean onSessionTimeout(Throwable failure)
onStreamFailureback to summary
public void onStreamFailure(Stream stream, Throwable failure, Callback callback)
onStreamTimeoutback to summary
public void onStreamTimeout(Stream stream, TimeoutException timeout, Promise<Boolean> promise)
onTrailersback to summary
public void onTrailers(Stream stream, HeadersFrame frame)
pollHttpChannelback to summary
private HttpChannel pollHttpChannel()
pushback to summary
public void push(HTTP2Stream stream, MetaData.Request request)
removeAttributeback to summary
public Object removeAttribute(String name)

Implements org.eclipse.jetty.util.Attributes.removeAttribute.

Doc from org.eclipse.jetty.util.Attributes.removeAttribute.

Remove an attribute

Parameters
name:String

the attribute to remove

Returns:Object

the value of the attribute if removed, else null

Annotations
@Override
setAttributeback to summary
public Object setAttribute(String name, Object attribute)

Implements org.eclipse.jetty.util.Attributes.setAttribute.

Doc from org.eclipse.jetty.util.Attributes.setAttribute.

Set an attribute

Parameters
name:String

the attribute to set

attribute:Object

the value to set. A null value is equivalent to removing the attribute.

Returns:Object

the previous value of the attribute if set, else null

Annotations
@Override
setRecycleHttpChannelsback to summary
public void setRecycleHttpChannels(boolean recycleHttpChannels)
upgradeback to summary
public boolean upgrade(MetaData.Request request, HttpFields.Mutable responseFields)