public class ClientHttp1IOEventHandler extends Object
IOEventHandler that implements
client side HTTP/1.1 messaging protocol with full support for
duplexed message transmission and message pipelining.| Constructor and Description |
|---|
ClientHttp1IOEventHandler(ClientHttp1StreamDuplexer streamDuplexer) |
| 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.
|
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 ClientHttp1IOEventHandler(ClientHttp1StreamDuplexer streamDuplexer)
public ProtocolVersion getProtocolVersion()
HttpConnectionnull if unknown.getProtocolVersion in interface HttpConnectionnull if unknown.public void connected(IOSession session) throws IOException
IOEventHandlerconnected in interface IOEventHandlersession - the I/O session.IOException - in case of an I/O error.public void inputReady(IOSession session, ByteBuffer src) throws IOException
IOEventHandlerinputReady in interface IOEventHandlersession - the I/O session.IOException - in case of an I/O error.public void outputReady(IOSession session) throws IOException
IOEventHandleroutputReady in interface IOEventHandlersession - the I/O session.IOException - in case of an I/O error.public void timeout(IOSession session, Timeout timeout) throws IOException
IOEventHandlertimeout in interface IOEventHandlersession - the I/O session.timeout - the timeout.IOException - in case of an I/O error.public void exception(IOSession session, Exception cause)
IOEventHandlerexception in interface IOEventHandlersession - the I/O session.public void disconnected(IOSession session)
IOEventHandlerdisconnected in interface IOEventHandlersession - the I/O session.public void close()
throws IOException
HttpConnectionshutdown instead.close in interface Closeableclose in interface AutoCloseableclose in interface HttpConnectionIOExceptionpublic void close(CloseMode closeMode)
ModalCloseableclose in interface ModalCloseablecloseMode - How to close the receiver.public boolean isOpen()
HttpConnectionisOpen in interface HttpConnectionpublic void setSocketTimeout(Timeout timeout)
SocketModalCloseablesetSocketTimeout in interface SocketModalCloseabletimeout - timeout valuepublic SSLSession getSSLSession()
HttpConnectionnull if TLS has not been activated.getSSLSession in interface HttpConnectionnull if TLS has not been activated.public EndpointDetails getEndpointDetails()
HttpConnectiongetEndpointDetails in interface HttpConnectionpublic Timeout getSocketTimeout()
SocketModalCloseablegetSocketTimeout in interface SocketModalCloseablepublic SocketAddress getRemoteAddress()
HttpConnectionnull if it is not connected yet or
unconnected.getRemoteAddress in interface HttpConnectionnull if it is not connected yet or
unconnected.public SocketAddress getLocalAddress()
HttpConnectionnull if it is not bound yet.getLocalAddress in interface HttpConnectionnull if it is not bound yet.Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.