public class ClientH2IOEventHandler extends Object
IOEventHandler that implements
client side HTTP/2 messaging protocol with full support for
multiplexed message transmission.| 构造器和说明 |
|---|
ClientH2IOEventHandler(ClientH2StreamMultiplexer streamMultiplexer) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Closes this connection gracefully.
|
void |
close(CloseMode closeMode)
Closes this process or endpoint and releases any system resources associated
with it.
|
void |
connected(IOSession session)
Triggered after the given session has been just created.
|
void |
disconnected(IOSession session)
Triggered when the given session has been terminated.
|
void |
exception(IOSession session,
Exception cause)
Triggered when the given session throws a exception.
|
EndpointDetails |
getEndpointDetails()
Returns this connection's endpoint details.
|
SocketAddress |
getLocalAddress()
Returns this connection's local address or
null if it is not bound yet. |
ProtocolVersion |
getProtocolVersion()
Returns this connection's protocol version or
null if unknown. |
SocketAddress |
getRemoteAddress()
Returns this connection's remote address or
null if it is not connected yet or
unconnected. |
Timeout |
getSocketTimeout()
Returns the socket timeout value.
|
SSLSession |
getSSLSession()
Returns this connection's SSL session or
null if TLS has not been activated. |
void |
inputReady(IOSession session,
ByteBuffer src)
Triggered when the given session has input pending.
|
boolean |
isOpen()
Checks if this connection is open.
|
void |
outputReady(IOSession session)
Triggered when the given session is ready for output.
|
void |
setSocketTimeout(Timeout timeout)
Sets the socket timeout value.
|
void |
timeout(IOSession session,
Timeout timeout)
Triggered when the given session has timed out.
|
String |
toString() |
public ClientH2IOEventHandler(ClientH2StreamMultiplexer streamMultiplexer)
public void connected(IOSession session) throws IOException
IOEventHandlerconnected 在接口中 IOEventHandlersession - the I/O session.IOExceptionpublic void inputReady(IOSession session, ByteBuffer src) throws IOException
IOEventHandlerinputReady 在接口中 IOEventHandlersession - the I/O session.IOExceptionpublic void outputReady(IOSession session) throws IOException
IOEventHandleroutputReady 在接口中 IOEventHandlersession - the I/O session.IOExceptionpublic void timeout(IOSession session, Timeout timeout) throws IOException
IOEventHandlertimeout 在接口中 IOEventHandlersession - the I/O session.timeout - the timeout.IOExceptionpublic void exception(IOSession session, Exception cause)
IOEventHandlerexception 在接口中 IOEventHandlersession - the I/O session.public void disconnected(IOSession session)
IOEventHandlerdisconnected 在接口中 IOEventHandlersession - the I/O session.public void close()
throws IOException
HttpConnectionshutdown instead.close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在接口中 HttpConnectionIOExceptionpublic void close(CloseMode closeMode)
ModalCloseableclose 在接口中 ModalCloseablecloseMode - How to close the receiver.public boolean isOpen()
HttpConnectionisOpen 在接口中 HttpConnectionpublic void setSocketTimeout(Timeout timeout)
SocketModalCloseablesetSocketTimeout 在接口中 SocketModalCloseabletimeout - timeout valuepublic SSLSession getSSLSession()
HttpConnectionnull if TLS has not been activated.getSSLSession 在接口中 HttpConnectionnull if TLS has not been activated.public EndpointDetails getEndpointDetails()
HttpConnectiongetEndpointDetails 在接口中 HttpConnectionpublic Timeout getSocketTimeout()
SocketModalCloseablegetSocketTimeout 在接口中 SocketModalCloseablepublic ProtocolVersion getProtocolVersion()
HttpConnectionnull if unknown.getProtocolVersion 在接口中 HttpConnectionnull if unknown.public SocketAddress getRemoteAddress()
HttpConnectionnull if it is not connected yet or
unconnected.getRemoteAddress 在接口中 HttpConnectionnull if it is not connected yet or
unconnected.public SocketAddress getLocalAddress()
HttpConnectionnull if it is not bound yet.getLocalAddress 在接口中 HttpConnectionnull if it is not bound yet.Copyright © 2023. All rights reserved.