@Internal public class ClientH2PrefaceHandler extends Object
ProtocolIOSession that implements
client side of the HTTP/2 protocol negotiation handshake always forcing the choice
of HTTP/2.| 构造器和说明 |
|---|
ClientH2PrefaceHandler(ProtocolIOSession ioSession,
ClientH2StreamMultiplexerFactory http2StreamHandlerFactory,
boolean strictALPNHandshake) |
ClientH2PrefaceHandler(ProtocolIOSession ioSession,
ClientH2StreamMultiplexerFactory http2StreamHandlerFactory,
boolean strictALPNHandshake,
FutureCallback<ProtocolIOSession> resultCallback) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 ClientH2PrefaceHandler(ProtocolIOSession ioSession, ClientH2StreamMultiplexerFactory http2StreamHandlerFactory, boolean strictALPNHandshake)
public ClientH2PrefaceHandler(ProtocolIOSession ioSession, ClientH2StreamMultiplexerFactory http2StreamHandlerFactory, boolean strictALPNHandshake, FutureCallback<ProtocolIOSession> resultCallback)
public void connected(IOSession session) throws IOException
IOEventHandlersession - the I/O session.IOExceptionpublic void outputReady(IOSession session) throws IOException
IOEventHandlersession - the I/O session.IOExceptionpublic void inputReady(IOSession session, ByteBuffer src) throws IOException
IOEventHandlersession - the I/O session.IOExceptionpublic void timeout(IOSession session, Timeout timeout)
IOEventHandlertimeout 在接口中 IOEventHandlersession - the I/O session.timeout - the timeout.public void exception(IOSession session, Exception cause)
IOEventHandlerexception 在接口中 IOEventHandlersession - the I/O session.public void disconnected(IOSession session)
IOEventHandlerdisconnected 在接口中 IOEventHandlersession - the I/O session.public SSLSession getSSLSession()
HttpConnectionnull if TLS has not been activated.getSSLSession 在接口中 HttpConnectionnull if TLS has not been activated.public EndpointDetails getEndpointDetails()
HttpConnectiongetEndpointDetails 在接口中 HttpConnectionpublic void setSocketTimeout(Timeout timeout)
SocketModalCloseablesetSocketTimeout 在接口中 SocketModalCloseabletimeout - timeout valuepublic 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.public boolean isOpen()
HttpConnectionisOpen 在接口中 HttpConnectionpublic void close()
throws IOException
HttpConnectionshutdown instead.close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在接口中 HttpConnectionIOExceptionpublic void close(CloseMode closeMode)
ModalCloseableclose 在接口中 ModalCloseablecloseMode - How to close the receiver.Copyright © 2023. All rights reserved.