Class HTTP2Connection
- All Implemented Interfaces:
 Closeable, AutoCloseable, Parser.Listener, Connection, Connection.UpgradeTo
- 
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AbstractConnection
AbstractConnection.NonBlockingNested classes/interfaces inherited from interface Connection
Connection.Listener, Connection.Tunnel, Connection.UpgradeFrom, Connection.UpgradeToNested classes/interfaces inherited from interface Parser.Listener
Parser.Listener.Wrapper - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHTTP2Connection(ByteBufferPool bufferPool, Executor executor, EndPoint endPoint, HTTP2Session session, int bufferSize) protectedHTTP2Connection(ByteBufferPool bufferPool, Executor executor, EndPoint endPoint, HTTP2Session session, int bufferSize, int minBufferSpace)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Performs a logical close of this connection.protected voiddispatch()longlonglonglongbooleanbooleanvoidvoidCallback method invoked when this connection is closed.voidonConnectionFailure(int error, String reason) voidvoidCallback method invoked when the endpoint is ready to be read.voidonGoAway(GoAwayFrame frame) voidonHeaders(HeadersFrame frame) booleanonIdleExpired(TimeoutException timeoutException) Callback method invoked upon an idle timeout event.voidonOpen()Callback method invoked when this connection is opened.voidvoidonPriority(PriorityFrame frame) voidonPushPromise(PushPromiseFrame frame) voidonReset(ResetFrame frame) voidonSettings(SettingsFrame frame) voidonStreamFailure(int streamId, int error, String reason) voidonUpgradeTo(ByteBuffer buffer) Invoked during anupgradeto receive a buffer containing bytes that have not been consumed by the upgrade-from connection, and that must be consumed by this connection.voidonWindowUpdate(WindowUpdateFrame frame) protected voidproduce()voidsetUseInputDirectByteBuffers(boolean useInputDirectByteBuffers) voidsetUseOutputDirectByteBuffers(boolean useOutputDirectByteBuffers)  
- 
Constructor Details
- 
HTTP2Connection
protected HTTP2Connection(ByteBufferPool bufferPool, Executor executor, EndPoint endPoint, HTTP2Session session, int bufferSize)  - 
HTTP2Connection
protected HTTP2Connection(ByteBufferPool bufferPool, Executor executor, EndPoint endPoint, HTTP2Session session, int bufferSize, int minBufferSpace)  
 - 
 - 
Method Details
- 
getMessagesIn
public long getMessagesIn()- Specified by:
 getMessagesInin interfaceConnection- Overrides:
 getMessagesInin classAbstractConnection
 - 
getMessagesOut
public long getMessagesOut()- Specified by:
 getMessagesOutin interfaceConnection- Overrides:
 getMessagesOutin classAbstractConnection
 - 
getBytesIn
public long getBytesIn()- Specified by:
 getBytesInin interfaceConnection- Overrides:
 getBytesInin classAbstractConnection
 - 
getBytesOut
public long getBytesOut()- Specified by:
 getBytesOutin interfaceConnection- Overrides:
 getBytesOutin classAbstractConnection
 - 
getSession
 - 
onUpgradeTo
Description copied from interface:Connection.UpgradeToInvoked during an
upgradeto receive a buffer containing bytes that have not been consumed by the upgrade-from connection, and that must be consumed by this connection.- Specified by:
 onUpgradeToin interfaceConnection.UpgradeTo- Parameters:
 buffer- a non-null buffer of unconsumed bytes received from the upgrade-from connection. The buffer does not belong to any pool and should be discarded after having consumed its bytes.
 - 
isUseInputDirectByteBuffers
public boolean isUseInputDirectByteBuffers() - 
setUseInputDirectByteBuffers
public void setUseInputDirectByteBuffers(boolean useInputDirectByteBuffers)  - 
isUseOutputDirectByteBuffers
public boolean isUseOutputDirectByteBuffers() - 
setUseOutputDirectByteBuffers
public void setUseOutputDirectByteBuffers(boolean useOutputDirectByteBuffers)  - 
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 classAbstractConnection
 - 
onClose
Description copied from interface:ConnectionCallback method invoked when this connection is closed.
Creators of the connection implementation are responsible for calling this method.
- Specified by:
 onClosein interfaceConnection- Overrides:
 onClosein classAbstractConnection- Parameters:
 cause- The cause of the close or null for a normal close
 - 
onFillable
public void onFillable()Description copied from class:AbstractConnectionCallback method invoked when the endpoint is ready to be read.
- Specified by:
 onFillablein classAbstractConnection- See Also:
 
 - 
onIdleExpired
Description copied from interface:ConnectionCallback 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.
- Specified by:
 onIdleExpiredin interfaceConnection- Overrides:
 onIdleExpiredin classAbstractConnection- Returns:
 - true to let the EndPoint handle the idle timeout, false to tell the EndPoint to halt the handling of the idle timeout.
 
 - 
offerTask
- Parameters:
 task- The task to offer to the connection.dispatch-trueto dispatch the task,falseto produce in the calling thread. Callers from application threads should usetrue, otherwise they may be arbitrarily delayed. Callers from I/O threads should usefalseto avoid thread hops.
 - 
produce
protected void produce() - 
dispatch
protected void dispatch() - 
close
public void close()Description copied from interface:ConnectionPerforms a logical close of this connection.
For simple connections, this may just mean to delegate the close to the associated
EndPointbut, for example, SSL connections should write the SSL close message before closing the associatedEndPoint.- Specified by:
 closein interfaceAutoCloseable- Specified by:
 closein interfaceCloseable- Specified by:
 closein interfaceConnection- Overrides:
 closein classAbstractConnection
 - 
onHeaders
- Specified by:
 onHeadersin interfaceParser.Listener
 - 
onData
- Specified by:
 onDatain interfaceParser.Listener
 - 
onPriority
- Specified by:
 onPriorityin interfaceParser.Listener
 - 
onReset
- Specified by:
 onResetin interfaceParser.Listener
 - 
onSettings
- Specified by:
 onSettingsin interfaceParser.Listener
 - 
onPushPromise
- Specified by:
 onPushPromisein interfaceParser.Listener
 - 
onPing
- Specified by:
 onPingin interfaceParser.Listener
 - 
onGoAway
- Specified by:
 onGoAwayin interfaceParser.Listener
 - 
onWindowUpdate
- Specified by:
 onWindowUpdatein interfaceParser.Listener
 - 
onStreamFailure
- Specified by:
 onStreamFailurein interfaceParser.Listener
 - 
onConnectionFailure
- Specified by:
 onConnectionFailurein interfaceParser.Listener
 - 
toConnectionString
- Overrides:
 toConnectionStringin classAbstractConnection
 
 -