|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.pastry.wire.SelectorManager
This class is the class which handles the selector, and listens for activity. When activity occurs, it figures out who is interested in what has happened, and hands off to that object.
Field Summary | |
int |
SELECT_WAIT_TIME
the amount of time to wait during a selection (ms) |
Constructor Summary | |
SelectorManager(WirePastryNode node)
Constructor. |
Method Summary | |
java.nio.channels.Selector |
getSelector()
Returns the selector used by this SelectorManager. |
boolean |
isAlive()
Gets the Alive attribute of the SelectorManager object |
void |
kill()
To be used for testing purposes only - kills the socket client by shutting down all outgoing sockets and stopping the client thread. |
void |
registerForWakeup(NeedsWakeUp skh)
required to register all objects that need a routine wakeup call on the Selector thread. |
void |
run()
This method starts the datagram manager listening for incoming datagrams. |
void |
unregisterForWakeup(NeedsWakeUp skh)
used to unregister an object for wakeup on the Selector thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int SELECT_WAIT_TIME
Constructor Detail |
public SelectorManager(WirePastryNode node)
node
- The pastry node this SelectorManager is servingMethod Detail |
public java.nio.channels.Selector getSelector()
public boolean isAlive()
public void registerForWakeup(NeedsWakeUp skh)
skh
- The object to call wakeup on.public void unregisterForWakeup(NeedsWakeUp skh)
skh
- The object to stop calling wakeup on.public void run()
public void kill()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |