Package org.apache.http.impl.nio.reactor
Class AbstractIODispatch<T>
java.lang.Object
org.apache.http.impl.nio.reactor.AbstractIODispatch<T>
- Type Parameters:
T
- the connection type.
- All Implemented Interfaces:
IOEventDispatch
- Direct Known Subclasses:
DefaultClientIOEventDispatch
,DefaultHttpClientIODispatch
,DefaultHttpServerIODispatch
,DefaultServerIOEventDispatch
Abstract
IOEventDispatch
implementation that supports both plain (non-encrypted)
and SSL encrypted HTTP connections.- Since:
- 4.2
-
Field Summary
Fields inherited from interface org.apache.http.nio.reactor.IOEventDispatch
CONNECTION_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Triggered after the given session has been just created.protected abstract T
createConnection
(IOSession session) void
disconnected
(IOSession session) Triggered when the given session has been terminated.private void
ensureNotNull
(T conn) void
inputReady
(IOSession session) Triggered when the given session has input pending.protected abstract void
protected abstract void
onConnected
(T conn) protected abstract void
onException
(T conn, IOException ex) protected abstract void
onInputReady
(T conn) protected abstract void
onOutputReady
(T conn) protected abstract void
void
outputReady
(IOSession session) Triggered when the given session is ready for output.void
Triggered when the given session as timed out.
-
Constructor Details
-
AbstractIODispatch
public AbstractIODispatch()
-
-
Method Details
-
createConnection
-
onConnected
-
onClosed
-
onException
-
onInputReady
-
onOutputReady
-
onTimeout
-
ensureNotNull
-
connected
Description copied from interface:IOEventDispatch
Triggered after the given session has been just created.- Specified by:
connected
in interfaceIOEventDispatch
- Parameters:
session
- the I/O session.
-
disconnected
Description copied from interface:IOEventDispatch
Triggered when the given session has been terminated.- Specified by:
disconnected
in interfaceIOEventDispatch
- Parameters:
session
- the I/O session.
-
inputReady
Description copied from interface:IOEventDispatch
Triggered when the given session has input pending.- Specified by:
inputReady
in interfaceIOEventDispatch
- Parameters:
session
- the I/O session.
-
outputReady
Description copied from interface:IOEventDispatch
Triggered when the given session is ready for output.- Specified by:
outputReady
in interfaceIOEventDispatch
- Parameters:
session
- the I/O session.
-
timeout
Description copied from interface:IOEventDispatch
Triggered when the given session as timed out.- Specified by:
timeout
in interfaceIOEventDispatch
- Parameters:
session
- the I/O session.
-