Class AbstractH2IOEventHandler
java.lang.Object
org.apache.hc.core5.http2.impl.nio.AbstractH2IOEventHandler
- All Implemented Interfaces:
Closeable,AutoCloseable,HttpConnection,HttpConnectionEventHandler,SocketModalCloseable,ModalCloseable,IOEventHandler
- Direct Known Subclasses:
ClientH2IOEventHandler,ServerH2IOEventHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this connection gracefully.voidCloses this process or endpoint and releases any system resources associated with it.voidTriggered after the given session has been just created.voiddisconnected(IOSession session) Triggered when the given session has been terminated.voidTriggered when the given session throws a exception.Returns this connection's endpoint details.Returns this connection's local address ornullif it is not bound yet.Returns this connection's protocol version ornullif unknown.Returns this connection's remote address ornullif it is not connected yet or unconnected.Returns the socket timeout value.Returns this connection's SSL session ornullif TLS has not been activated.voidinputReady(IOSession session, ByteBuffer src) Triggered when the given session has input pending.booleanisOpen()Checks if this connection is open.voidoutputReady(IOSession session) Triggered when the given session is ready for output.voidsetSocketTimeout(Timeout timeout) Sets the socket timeout value.voidTriggered when the given session has timed out.
-
Field Details
-
streamMultiplexer
-
-
Constructor Details
-
AbstractH2IOEventHandler
AbstractH2IOEventHandler(AbstractH2StreamMultiplexer streamMultiplexer)
-
-
Method Details
-
connected
Description copied from interface:IOEventHandlerTriggered after the given session has been just created.- Specified by:
connectedin interfaceIOEventHandler- Parameters:
session- the I/O session.- Throws:
IOException
-
inputReady
Description copied from interface:IOEventHandlerTriggered when the given session has input pending.- Specified by:
inputReadyin interfaceIOEventHandler- Parameters:
session- the I/O session.- Throws:
IOException
-
outputReady
Description copied from interface:IOEventHandlerTriggered when the given session is ready for output.- Specified by:
outputReadyin interfaceIOEventHandler- Parameters:
session- the I/O session.- Throws:
IOException
-
timeout
Description copied from interface:IOEventHandlerTriggered when the given session has timed out.- Specified by:
timeoutin interfaceIOEventHandler- Parameters:
session- the I/O session.timeout- the timeout.- Throws:
IOException
-
exception
Description copied from interface:IOEventHandlerTriggered when the given session throws a exception.- Specified by:
exceptionin interfaceIOEventHandler- Parameters:
session- the I/O session.
-
disconnected
Description copied from interface:IOEventHandlerTriggered when the given session has been terminated.- Specified by:
disconnectedin interfaceIOEventHandler- Parameters:
session- the I/O session.
-
close
Description copied from interface:HttpConnectionCloses this connection gracefully. This method will attempt to flush the internal output buffer prior to closing the underlying socket. This method MUST NOT be called from a different thread to force shutdown of the connection. Useshutdowninstead.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceHttpConnection- Throws:
IOException
-
close
Description copied from interface:ModalCloseableCloses this process or endpoint and releases any system resources associated with it. If the endpoint or the process is already closed then invoking this method has no effect.- Specified by:
closein interfaceModalCloseable- Parameters:
closeMode- How to close the receiver.
-
isOpen
public boolean isOpen()Description copied from interface:HttpConnectionChecks if this connection is open.- Specified by:
isOpenin interfaceHttpConnection- Returns:
- true if it is open, false if it is closed.
-
setSocketTimeout
Description copied from interface:SocketModalCloseableSets the socket timeout value.- Specified by:
setSocketTimeoutin interfaceSocketModalCloseable- Parameters:
timeout- timeout value
-
getSSLSession
Description copied from interface:HttpConnectionReturns this connection's SSL session ornullif TLS has not been activated.- Specified by:
getSSLSessionin interfaceHttpConnection- Returns:
- this connection's SSL session or
nullif TLS has not been activated.
-
getEndpointDetails
Description copied from interface:HttpConnectionReturns this connection's endpoint details.- Specified by:
getEndpointDetailsin interfaceHttpConnection- Returns:
- this connection's endpoint details.
-
getSocketTimeout
Description copied from interface:SocketModalCloseableReturns the socket timeout value.- Specified by:
getSocketTimeoutin interfaceSocketModalCloseable- Returns:
- timeout value.
-
getProtocolVersion
Description copied from interface:HttpConnectionReturns this connection's protocol version ornullif unknown.- Specified by:
getProtocolVersionin interfaceHttpConnection- Returns:
- this connection's protocol version or
nullif unknown.
-
getRemoteAddress
Description copied from interface:HttpConnectionReturns this connection's remote address ornullif it is not connected yet or unconnected.- Specified by:
getRemoteAddressin interfaceHttpConnection- Returns:
- this connection's remote address or
nullif it is not connected yet or unconnected.
-
getLocalAddress
Description copied from interface:HttpConnectionReturns this connection's local address ornullif it is not bound yet.- Specified by:
getLocalAddressin interfaceHttpConnection- Returns:
- this connection's local address or
nullif it is not bound yet.
-