|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectorg.xsocket.Dispatcher<T>
public class Dispatcher<T extends IHandle>
implementation of the IDispatcher
All dispatcher methods are thread save.
| Constructor Summary | |
|---|---|
Dispatcher(IEventHandler<T> eventHandler)
constructor |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
deregister(T handle)
deregister a handle. |
IEventHandler<T> |
getEventHandler()
get the event handler of this dispatcher . |
long |
getNumberOfHandledReads()
get the number of handled reads |
long |
getNumberOfHandledRegistrations()
get the number of handled registractions |
long |
getNumberOfHandledWrites()
get the number of handled writes |
java.util.Set<T> |
getRegistered()
return the registered handles |
boolean |
isOpen()
check if this dispatcher is open |
void |
register(T handle,
int ops)
register a new handle. |
void |
run()
|
void |
updateInterestSet(T handle,
int ops)
announce a write for he given handle. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dispatcher(IEventHandler<T> eventHandler)
eventHandler - the assigned event handler| Method Detail |
|---|
public final IEventHandler<T> getEventHandler()
getEventHandler in interface IDispatcher<T extends IHandle>
public void register(T handle,
int ops)
throws java.io.IOException
register in interface IDispatcher<T extends IHandle>handle - the handle to registerops - the interest set
java.io.IOException - If some I/O error occurs
public void deregister(T handle)
throws java.io.IOException
deregister in interface IDispatcher<T extends IHandle>handle - the handle to deregister
java.io.IOException - If some I/O error occurspublic final java.util.Set<T> getRegistered()
getRegistered in interface IDispatcher<T extends IHandle>
public final void updateInterestSet(T handle,
int ops)
throws java.io.IOException
updateInterestSet in interface IDispatcher<T extends IHandle>handle - the handle for the write needops - the interest set
java.io.IOException - if the given hnadle is invalidpublic final void run()
run in interface java.lang.Runnablepublic void close()
close in interface java.io.Closeablepublic final boolean isOpen()
public final long getNumberOfHandledRegistrations()
getNumberOfHandledRegistrations in interface IDispatcher<T extends IHandle>public final long getNumberOfHandledReads()
getNumberOfHandledReads in interface IDispatcher<T extends IHandle>public final long getNumberOfHandledWrites()
getNumberOfHandledWrites in interface IDispatcher<T extends IHandle>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||