|
XNIO version 1.2.1.GA | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.xnio.DelegatingIoHandler<T>
public abstract class DelegatingIoHandler<T extends Channel>
A base delegating I/O handler. Implementors may separately set read and write handlers. Ideal for state pattern handlers for example.
Constructor Summary | |
---|---|
DelegatingIoHandler()
|
Method Summary | |
---|---|
protected IoReadHandler<T> |
getReadHandler()
Get the read handler. |
protected IoWriteHandler<T> |
getWriteHandler()
Get the write handler. |
void |
handleReadable(T channel)
Handles a readable notification by delegating it to the set read handler, if there is one; otherwise the notification is ignored. |
void |
handleWritable(T channel)
Handles a writable notification by delegating it to the set write handler, if there is one; otherwise the notification is ignored. |
protected void |
setReadHandler(IoReadHandler<T> readHandler)
Set the read handler. |
protected void |
setWriteHandler(IoWriteHandler<T> writeHandler)
Set the write handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.xnio.IoHandler |
---|
handleClosed, handleOpened |
Constructor Detail |
---|
public DelegatingIoHandler()
Method Detail |
---|
public final void handleReadable(T channel)
handleReadable
in interface IoReadHandler<T extends Channel>
channel
- the channel that is readablepublic final void handleWritable(T channel)
handleWritable
in interface IoWriteHandler<T extends Channel>
channel
- the channel that is writableprotected IoReadHandler<T> getReadHandler()
protected void setReadHandler(IoReadHandler<T> readHandler)
readHandler
- the new read handlerprotected IoWriteHandler<T> getWriteHandler()
protected void setWriteHandler(IoWriteHandler<T> writeHandler)
writeHandler
- the new write handler
|
XNIO version 1.2.1.GA | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |