Top Fields Constructors Methods
org.apache.hc.core5.http2.impl.nio

pack-priv Class AbstractH2IOEventHandler

extends Object
implements HttpConnectionEventHandler
Class Inheritance
All Implemented Interfaces
org.apache.hc.core5.http.impl.nio.HttpConnectionEventHandler, org.apache.hc.core5.http.HttpConnection, org.apache.hc.core5.http.SocketModalCloseable, org.apache.hc.core5.io.ModalCloseable, java.io.Closeable, java.lang.AutoCloseable, org.apache.hc.core5.reactor.IOEventHandler
Known Direct Subclasses
org.apache.hc.core5.http2.impl.nio.ClientH2IOEventHandler, org.apache.hc.core5.http2.impl.nio.ServerH2IOEventHandler
Imports
java.io.IOException, java.net.SocketAddress, java.nio.ByteBuffer, javax.net.ssl.SSLSession, org.apache.hc.core5.http.EndpointDetails, .HttpException, .ProtocolVersion, org.apache.hc.core5.http.impl.nio.HttpConnectionEventHandler, org.apache.hc.core5.io.CloseMode, org.apache.hc.core5.reactor.IOSession, org.apache.hc.core5.util.Args, .Timeout

Field Summary

Modifier and TypeField and Description
pack-priv final AbstractH2StreamMultiplexer

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements org.apache.hc.core5.http.HttpConnection.close.

Closes this connection gracefully.
public void
close(final CloseMode
How to close the receiver.
closeMode
)

Implements org.apache.hc.core5.io.ModalCloseable.close.

Closes this process or endpoint and releases any system resources associated with it.
public void
connected(final IOSession
the I/O session.
session
)

Implements org.apache.hc.core5.reactor.IOEventHandler.connected.

Triggered after the given session has been just created.
public void
disconnected(final IOSession
the I/O session.
session
)

Implements org.apache.hc.core5.reactor.IOEventHandler.disconnected.

Triggered when the given session has been terminated.
public void
exception(final IOSession
the I/O session.
session
,
final Exception cause)

Implements org.apache.hc.core5.reactor.IOEventHandler.exception.

Triggered when the given session throws a exception.
public EndpointDetails
getEndpointDetails()

Implements org.apache.hc.core5.http.HttpConnection.getEndpointDetails.

Returns this connection's endpoint details.
public SocketAddress
getLocalAddress()

Implements org.apache.hc.core5.http.HttpConnection.getLocalAddress.

Returns this connection's local address or null if it is not bound yet.
public ProtocolVersion
getProtocolVersion()

Implements org.apache.hc.core5.http.HttpConnection.getProtocolVersion.

Returns this connection's protocol version or null if unknown.
public SocketAddress
getRemoteAddress()

Implements org.apache.hc.core5.http.HttpConnection.getRemoteAddress.

Returns this connection's remote address or null if it is not connected yet or unconnected.
public Timeout
public SSLSession
getSSLSession()

Implements org.apache.hc.core5.http.HttpConnection.getSSLSession.

Returns this connection's SSL session or null if TLS has not been activated.
public void
inputReady(final IOSession
the I/O session.
session
,
final ByteBuffer src)

Implements org.apache.hc.core5.reactor.IOEventHandler.inputReady.

Triggered when the given session has input pending.
public boolean
isOpen()

Implements org.apache.hc.core5.http.HttpConnection.isOpen.

Checks if this connection is open.
public void
outputReady(final IOSession
the I/O session.
session
)

Implements org.apache.hc.core5.reactor.IOEventHandler.outputReady.

Triggered when the given session is ready for output.
public void
setSocketTimeout(final Timeout
timeout value
timeout
)

Implements org.apache.hc.core5.http.SocketModalCloseable.setSocketTimeout.

Sets the socket timeout value.
public void
timeout(final IOSession
the I/O session.
session
,
final Timeout
the timeout.
timeout
)

Implements org.apache.hc.core5.reactor.IOEventHandler.timeout.

Triggered when the given session has timed out.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

streamMultiplexerback to summary
pack-priv final AbstractH2StreamMultiplexer streamMultiplexer

Constructor Detail

AbstractH2IOEventHandlerback to summary
pack-priv AbstractH2IOEventHandler(final AbstractH2StreamMultiplexer streamMultiplexer)

Method Detail

closeback to summary
public void close() throws IOException

Implements org.apache.hc.core5.http.HttpConnection.close.

Doc from org.apache.hc.core5.http.HttpConnection.close.

Closes 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. Use shutdown instead.

Annotations
@Override
Exceptions
IOException:

Doc from java.io.Closeable.close.

if an I/O error occurs

closeback to summary
public void close(final CloseMode closeMode)

Implements org.apache.hc.core5.io.ModalCloseable.close.

Doc from org.apache.hc.core5.io.ModalCloseable.close.

Closes 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.

Parameters
closeMode:CloseMode

How to close the receiver.

Annotations
@Override
connectedback to summary
public void connected(final IOSession session) throws IOException

Implements org.apache.hc.core5.reactor.IOEventHandler.connected.

Doc from org.apache.hc.core5.reactor.IOEventHandler.connected.

Triggered after the given session has been just created.

Parameters
session:IOSession

the I/O session.

Annotations
@Override
disconnectedback to summary
public void disconnected(final IOSession session)

Implements org.apache.hc.core5.reactor.IOEventHandler.disconnected.

Doc from org.apache.hc.core5.reactor.IOEventHandler.disconnected.

Triggered when the given session has been terminated.

Parameters
session:IOSession

the I/O session.

Annotations
@Override
exceptionback to summary
public void exception(final IOSession session, final Exception cause)

Implements org.apache.hc.core5.reactor.IOEventHandler.exception.

Doc from org.apache.hc.core5.reactor.IOEventHandler.exception.

Triggered when the given session throws a exception.

Parameters
session:IOSession

the I/O session.

Annotations
@Override
getEndpointDetailsback to summary
public EndpointDetails getEndpointDetails()

Implements org.apache.hc.core5.http.HttpConnection.getEndpointDetails.

Doc from org.apache.hc.core5.http.HttpConnection.getEndpointDetails.

Returns this connection's endpoint details.

Returns:EndpointDetails

this connection's endpoint details.

Annotations
@Override
getLocalAddressback to summary
public SocketAddress getLocalAddress()

Implements org.apache.hc.core5.http.HttpConnection.getLocalAddress.

Doc from org.apache.hc.core5.http.HttpConnection.getLocalAddress.

Returns this connection's local address or null if it is not bound yet.

Returns:SocketAddress

this connection's local address or null if it is not bound yet.

Annotations
@Override
getProtocolVersionback to summary
public ProtocolVersion getProtocolVersion()

Implements org.apache.hc.core5.http.HttpConnection.getProtocolVersion.

Doc from org.apache.hc.core5.http.HttpConnection.getProtocolVersion.

Returns this connection's protocol version or null if unknown.

Returns:ProtocolVersion

this connection's protocol version or null if unknown.

Annotations
@Override
getRemoteAddressback to summary
public SocketAddress getRemoteAddress()

Implements org.apache.hc.core5.http.HttpConnection.getRemoteAddress.

Doc from org.apache.hc.core5.http.HttpConnection.getRemoteAddress.

Returns this connection's remote address or null if it is not connected yet or unconnected.

Returns:SocketAddress

this connection's remote address or null if it is not connected yet or unconnected.

Annotations
@Override
getSocketTimeoutback to summary
public Timeout getSocketTimeout()

Implements org.apache.hc.core5.http.SocketModalCloseable.getSocketTimeout.

Doc from org.apache.hc.core5.http.SocketModalCloseable.getSocketTimeout.

Returns the socket timeout value.

Returns:Timeout

timeout value.

Annotations
@Override
getSSLSessionback to summary
public SSLSession getSSLSession()

Implements org.apache.hc.core5.http.HttpConnection.getSSLSession.

Doc from org.apache.hc.core5.http.HttpConnection.getSSLSession.

Returns this connection's SSL session or null if TLS has not been activated.

Returns:SSLSession

this connection's SSL session or null if TLS has not been activated.

Annotations
@Override
inputReadyback to summary
public void inputReady(final IOSession session, final ByteBuffer src) throws IOException

Implements org.apache.hc.core5.reactor.IOEventHandler.inputReady.

Doc from org.apache.hc.core5.reactor.IOEventHandler.inputReady.

Triggered when the given session has input pending.

Parameters
session:IOSession

the I/O session.

Annotations
@Override
isOpenback to summary
public boolean isOpen()

Implements org.apache.hc.core5.http.HttpConnection.isOpen.

Doc from org.apache.hc.core5.http.HttpConnection.isOpen.

Checks if this connection is open.

Returns:boolean

true if it is open, false if it is closed.

Annotations
@Override
outputReadyback to summary
public void outputReady(final IOSession session) throws IOException

Implements org.apache.hc.core5.reactor.IOEventHandler.outputReady.

Doc from org.apache.hc.core5.reactor.IOEventHandler.outputReady.

Triggered when the given session is ready for output.

Parameters
session:IOSession

the I/O session.

Annotations
@Override
setSocketTimeoutback to summary
public void setSocketTimeout(final Timeout timeout)

Implements org.apache.hc.core5.http.SocketModalCloseable.setSocketTimeout.

Doc from org.apache.hc.core5.http.SocketModalCloseable.setSocketTimeout.

Sets the socket timeout value.

Parameters
timeout:Timeout

timeout value

Annotations
@Override
timeoutback to summary
public void timeout(final IOSession session, final Timeout timeout) throws IOException

Implements org.apache.hc.core5.reactor.IOEventHandler.timeout.

Doc from org.apache.hc.core5.reactor.IOEventHandler.timeout.

Triggered when the given session has timed out.

Parameters
session:IOSession

the I/O session.

timeout:Timeout

the timeout.

Annotations
@Override