public class HTTP2ServerConnection extends HTTP2Connection implements Connection.UpgradeTo
HTTP2Connection.HTTP2ProducerConnection.Listener, Connection.UpgradeFrom, Connection.UpgradeToLOG| Constructor and Description |
|---|
HTTP2ServerConnection(ByteBufferPool byteBufferPool,
Executor executor,
EndPoint endPoint,
HttpConfiguration httpConfig,
ServerParser parser,
ISession session,
int inputBufferSize,
ServerSessionListener listener) |
| Modifier and Type | Method and Description |
|---|---|
long |
getMessagesIn() |
long |
getMessagesOut() |
protected ServerParser |
getParser() |
static boolean |
isSupportedProtocol(String protocol) |
void |
onData(IStream stream,
DataFrame frame,
Callback callback) |
void |
onNewStream(Connector connector,
IStream stream,
HeadersFrame frame) |
void |
onOpen()
Callback method invoked when this connection is opened.
|
void |
onSessionFailure(Throwable failure) |
boolean |
onSessionTimeout(Throwable failure) |
void |
onStreamFailure(IStream stream,
Throwable failure) |
boolean |
onStreamTimeout(IStream stream,
Throwable failure) |
void |
onTrailers(IStream stream,
HeadersFrame frame) |
void |
onUpgradeTo(ByteBuffer buffer)
Callback method invoked when this connection is upgraded.
|
void |
push(Connector connector,
IStream stream,
MetaData.Request request) |
boolean |
upgrade(MetaData.Request request) |
close, getBytesIn, getBytesOut, getSession, offerTask, onClose, onFillable, onIdleExpired, setInputBufferaddListener, failedCallback, fillInterested, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, isFillInterested, onFillInterestedFailed, onReadTimeout, removeListener, setInputBufferSize, toConnectionString, toString, tryFillInterested, tryFillInterestedpublic HTTP2ServerConnection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, HttpConfiguration httpConfig, ServerParser parser, ISession session, int inputBufferSize, ServerSessionListener listener)
public static boolean isSupportedProtocol(String protocol)
protocol - A HTTP2 protocol variantpublic long getMessagesIn()
getMessagesIn in interface ConnectiongetMessagesIn in class AbstractConnectionpublic long getMessagesOut()
getMessagesOut in interface ConnectiongetMessagesOut in class AbstractConnectionprotected ServerParser getParser()
getParser in class HTTP2Connectionpublic void onUpgradeTo(ByteBuffer buffer)
Connection.UpgradeToCallback method invoked when this connection is upgraded.
This must be called before Connection.onOpen().
onUpgradeTo in interface Connection.UpgradeTobuffer - An optional buffer that can contain prefilled data. Typically this
results from an upgrade of one protocol to the other where the old connection has buffered
data destined for the new connection. The new connection must take ownership of the buffer
and is responsible for returning it to the buffer poolpublic void onOpen()
ConnectionCallback method invoked when this connection is opened.
Creators of the connection implementation are responsible for calling this method.
onOpen in interface ConnectiononOpen in class HTTP2Connectionpublic void onNewStream(Connector connector, IStream stream, HeadersFrame frame)
public void onTrailers(IStream stream, HeadersFrame frame)
public boolean onSessionTimeout(Throwable failure)
public void onSessionFailure(Throwable failure)
public void push(Connector connector, IStream stream, MetaData.Request request)
public boolean upgrade(MetaData.Request request)
Copyright © 1995–2017 Webtide. All rights reserved.