T
- the connection type.public abstract class AbstractIODispatch<T> extends Object implements IOEventDispatch
IOEventDispatch
implementation that supports both plain (non-encrypted)
and SSL encrypted HTTP connections.CONNECTION_KEY
Constructor and Description |
---|
AbstractIODispatch() |
Modifier and Type | Method and Description |
---|---|
void |
connected(IOSession session)
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 |
onClosed(T conn) |
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 |
onTimeout(T conn) |
void |
outputReady(IOSession session)
Triggered when the given session is ready for output.
|
void |
timeout(IOSession session)
Triggered when the given session as timed out.
|
public AbstractIODispatch()
protected abstract T createConnection(IOSession session)
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)
private void ensureNotNull(T conn)
public void connected(IOSession session)
IOEventDispatch
connected
in interface IOEventDispatch
session
- the I/O session.public void disconnected(IOSession session)
IOEventDispatch
disconnected
in interface IOEventDispatch
session
- the I/O session.public void inputReady(IOSession session)
IOEventDispatch
inputReady
in interface IOEventDispatch
session
- the I/O session.public void outputReady(IOSession session)
IOEventDispatch
outputReady
in interface IOEventDispatch
session
- the I/O session.public void timeout(IOSession session)
IOEventDispatch
timeout
in interface IOEventDispatch
session
- the I/O session.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses