public class HTTP2ServerConnection extends HTTP2Connection implements Connection.UpgradeTo
HTTP2Connection.HTTP2Producer
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo
LOG
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 |
---|---|
protected ServerParser |
getParser() |
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 |
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, getSession, offerTask, onClose, onFillable, onIdleExpired, setInputBuffer
addListener, failedCallback, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, isDispatchIO, isFillInterested, onFillInterestedFailed, onReadTimeout, removeListener, setInputBufferSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, close, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getMessagesIn, getMessagesOut, onClose, onIdleExpired, removeListener
public HTTP2ServerConnection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, HttpConfiguration httpConfig, ServerParser parser, ISession session, int inputBufferSize, ServerSessionListener listener)
protected ServerParser getParser()
getParser
in class HTTP2Connection
public void onUpgradeTo(ByteBuffer buffer)
Connection.UpgradeTo
Callback method invoked when this connection is upgraded.
This must be called before Connection.onOpen()
.
onUpgradeTo
in interface Connection.UpgradeTo
buffer
- 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()
Connection
Callback method invoked when this connection is opened.
Creators of the connection implementation are responsible for calling this method.
onOpen
in interface Connection
onOpen
in class HTTP2Connection
public void onNewStream(Connector connector, IStream stream, HeadersFrame frame)
public void push(Connector connector, IStream stream, MetaData.Request request)
public boolean upgrade(MetaData.Request request)
Copyright © 1995-2016 Webtide. All Rights Reserved.