public class HTTP2Connection extends AbstractConnection
Modifier and Type | Class and Description |
---|---|
protected class |
HTTP2Connection.HTTP2Producer |
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo
Constructor and Description |
---|
HTTP2Connection(ByteBufferPool byteBufferPool,
Executor executor,
EndPoint endPoint,
Parser parser,
ISession session,
int bufferSize) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Performs a logical close of this connection.
|
long |
getBytesIn() |
long |
getBytesOut() |
protected Parser |
getParser() |
ISession |
getSession() |
protected void |
offerTask(Runnable task,
boolean dispatch) |
void |
onClose()
Callback method invoked when this connection is closed.
|
void |
onFillable()
Callback method invoked when the endpoint is ready to be read.
|
boolean |
onIdleExpired()
Callback method invoked upon an idle timeout event.
|
void |
onOpen()
Callback method invoked when this connection is opened.
|
protected void |
setInputBuffer(ByteBuffer buffer) |
addListener, failedCallback, fillInterested, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, isFillInterested, onFillInterestedFailed, onReadTimeout, removeListener, setInputBufferSize, toConnectionString, toString, tryFillInterested, tryFillInterested
protected static final Logger LOG
public HTTP2Connection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, Parser parser, ISession session, int bufferSize)
public long getBytesIn()
getBytesIn
in interface Connection
getBytesIn
in class AbstractConnection
public long getBytesOut()
getBytesOut
in interface Connection
getBytesOut
in class AbstractConnection
public ISession getSession()
protected Parser getParser()
protected void setInputBuffer(ByteBuffer buffer)
public 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 AbstractConnection
public void onClose()
Connection
Callback method invoked when this connection is closed.
Creators of the connection implementation are responsible for calling this method.
onClose
in interface Connection
onClose
in class AbstractConnection
public void onFillable()
AbstractConnection
Callback method invoked when the endpoint is ready to be read.
onFillable
in class AbstractConnection
AbstractConnection.fillInterested()
public boolean onIdleExpired()
Connection
Callback method invoked upon an idle timeout event.
Implementations of this method may return true to indicate that the idle timeout handling should proceed normally, typically failing the EndPoint and causing it to be closed.
When false is returned, the handling of the idle timeout event is halted immediately and the EndPoint left in the state it was before the idle timeout event.
onIdleExpired
in interface Connection
onIdleExpired
in class AbstractConnection
protected void offerTask(Runnable task, boolean dispatch)
public void close()
Connection
Performs a logical close of this connection.
For simple connections, this may just mean to delegate the close to the associated
EndPoint
but, for example, SSL connections should write the SSL close message
before closing the associated EndPoint
.
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Connection
close
in class AbstractConnection
Copyright © 1995–2017 Webtide. All rights reserved.