Top Description Methods
org.apache.hc.core5.reactor

public Interface IOEventHandler

Known Direct Subinterfaces
org.apache.hc.core5.http.impl.nio.HttpConnectionEventHandler
Known Direct Implementers
org.apache.hc.core5.reactor.SocksProxyProtocolHandler
Annotations
@Internal
Imports
java.io.IOException, java.nio.ByteBuffer, org.apache.hc.core5.annotation.Internal, org.apache.hc.core5.util.Timeout

IOEventHandler interface is used by I/O reactors to handle I/O events for individual I/O sessions. All methods of this interface are executed on a single dispatch thread of the I/O reactor. Therefore, it is important that event processing does not not block the I/O dispatch thread for too long, thus making the I/O reactor unable to react to other events.
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public void
connected(IOSession
the I/O session.
session
)

Triggered after the given session has been just created.

public void
disconnected(IOSession
the I/O session.
session
)

Triggered when the given session has been terminated.

public void
exception(IOSession
the I/O session.
session
,
Exception cause)

Triggered when the given session throws a exception.

public void
inputReady(IOSession
the I/O session.
session
,
ByteBuffer src)

Triggered when the given session has input pending.

public void
outputReady(IOSession
the I/O session.
session
)

Triggered when the given session is ready for output.

public void
timeout(IOSession
the I/O session.
session
,
Timeout
the timeout.
timeout
)

Triggered when the given session has timed out.

Method Detail

connectedback to summary
public void connected(IOSession session) throws IOException

Triggered after the given session has been just created.

Parameters
session:IOSession

the I/O session.

disconnectedback to summary
public void disconnected(IOSession session)

Triggered when the given session has been terminated.

Parameters
session:IOSession

the I/O session.

exceptionback to summary
public void exception(IOSession session, Exception cause)

Triggered when the given session throws a exception.

Parameters
session:IOSession

the I/O session.

inputReadyback to summary
public void inputReady(IOSession session, ByteBuffer src) throws IOException

Triggered when the given session has input pending.

Parameters
session:IOSession

the I/O session.

outputReadyback to summary
public void outputReady(IOSession session) throws IOException

Triggered when the given session is ready for output.

Parameters
session:IOSession

the I/O session.

timeoutback to summary
public void timeout(IOSession session, Timeout timeout) throws IOException

Triggered when the given session has timed out.

Parameters
session:IOSession

the I/O session.

timeout:Timeout

the timeout.