@Internal public class ClientH2StreamMultiplexer extends Object
ProtocolIOSession
that implements
client side HTTP/2 messaging protocol with full support for
multiplexed message transmission.Constructor and Description |
---|
ClientH2StreamMultiplexer(ProtocolIOSession ioSession,
FrameFactory frameFactory,
HttpProcessor httpProcessor,
HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
H2Config h2Config,
CharCodingConfig charCodingConfig,
H2StreamListener streamListener) |
ClientH2StreamMultiplexer(ProtocolIOSession ioSession,
HttpProcessor httpProcessor,
H2Config h2Config,
CharCodingConfig charCodingConfig) |
ClientH2StreamMultiplexer(ProtocolIOSession ioSession,
HttpProcessor httpProcessor,
HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
H2Config h2Config,
CharCodingConfig charCodingConfig) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this connection gracefully.
|
void |
close(CloseMode closeMode)
Closes this process or endpoint and releases any system resources associated
with it.
|
EndpointDetails |
getEndpointDetails()
Returns this connection's endpoint details.
|
String |
getId() |
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. |
boolean |
isOpen()
Checks if this connection is open.
|
void |
onConnect() |
void |
onDisconnect() |
void |
onException(Exception cause) |
void |
onInput(ByteBuffer src) |
void |
onOutput() |
void |
onTimeout(Timeout timeout) |
void |
setSocketTimeout(Timeout timeout)
Sets the socket timeout value.
|
String |
toString() |
public ClientH2StreamMultiplexer(ProtocolIOSession ioSession, FrameFactory frameFactory, HttpProcessor httpProcessor, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, H2Config h2Config, CharCodingConfig charCodingConfig, H2StreamListener streamListener)
public ClientH2StreamMultiplexer(ProtocolIOSession ioSession, HttpProcessor httpProcessor, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, H2Config h2Config, CharCodingConfig charCodingConfig)
public ClientH2StreamMultiplexer(ProtocolIOSession ioSession, HttpProcessor httpProcessor, H2Config h2Config, CharCodingConfig charCodingConfig)
public String getId()
getId
in interface Identifiable
public final void onConnect() throws HttpException, IOException
HttpException
IOException
public final void onInput(ByteBuffer src) throws HttpException, IOException
HttpException
IOException
public final void onOutput() throws HttpException, IOException
HttpException
IOException
public final void onTimeout(Timeout timeout) throws HttpException, IOException
HttpException
IOException
public final void onDisconnect()
public final void onException(Exception cause)
public void close() throws IOException
HttpConnection
shutdown
instead.close
in interface Closeable
close
in interface AutoCloseable
close
in interface HttpConnection
IOException
public void close(CloseMode closeMode)
ModalCloseable
close
in interface ModalCloseable
closeMode
- How to close the receiver.public boolean isOpen()
HttpConnection
isOpen
in interface HttpConnection
public void setSocketTimeout(Timeout timeout)
SocketModalCloseable
setSocketTimeout
in interface SocketModalCloseable
timeout
- timeout valuepublic SSLSession getSSLSession()
HttpConnection
null
if TLS has not been activated.getSSLSession
in interface HttpConnection
null
if TLS has not been activated.public EndpointDetails getEndpointDetails()
HttpConnection
getEndpointDetails
in interface HttpConnection
public Timeout getSocketTimeout()
SocketModalCloseable
getSocketTimeout
in interface SocketModalCloseable
public ProtocolVersion getProtocolVersion()
HttpConnection
null
if unknown.getProtocolVersion
in interface HttpConnection
null
if unknown.public SocketAddress getRemoteAddress()
HttpConnection
null
if it is not connected yet or
unconnected.getRemoteAddress
in interface HttpConnection
null
if it is not connected yet or
unconnected.public SocketAddress getLocalAddress()
HttpConnection
null
if it is not bound yet.getLocalAddress
in interface HttpConnection
null
if it is not bound yet.Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.