|
Jumpi v1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.jumpi.impl.SelectorImpl
A Selector implementation providing synchronization support and notification for multiple Handles.
| Constructor Summary | |
SelectorImpl()
|
|
| Method Summary | |
void |
addHandle(Handle hdl)
Add a Handle to the Selector's list of managed Handles. |
void |
addHandle(Handle hdl)
Add a Handle to the Selector's list of managed Handles. |
void |
clear()
Clear the list of managed Handles. |
java.util.Vector |
getAllHandles()
Return a Vector containing all Handles. |
java.util.Vector |
getBlockingHandles()
Return a Vector containing any blocking Handles. |
java.util.Vector |
getNonBlockingHandles()
Return a Vector containing any non blocking Handles. |
void |
handleStatusChanged(Handle hdl)
Notify all callers waiting in select() that the blocking status of a Handle has changed. |
Handle |
removeBlockingHandle()
Remove any blocking Handle or null if there is no blocking Handle. |
java.util.Vector |
removeBlockingHandles()
Remove and return all blocking Handles which exist in the Selector. |
void |
removeHandle(Handle hdl)
Remove a Handle from the Selector's list of managed Handles. |
void |
removeHandle(Handle hdl)
Remove a Handle from the Selector's list of managed Handles. |
Handle |
removeNonBlockingHandle()
Remove any non blocking Handle or null if there is no non blocking Handle. |
java.util.Vector |
removeNonBlockingHandles()
Remove and return all non blocking Handles which exist in the Selector. |
void |
select()
Wait indefinitely for at least one Handle to become non blocking. |
void |
select(long timeout)
Wait at most a timeout interval for at least one Handle to become non blocking. |
int |
size()
Return the number of registered Handles in the managed Handle list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SelectorImpl()
| Method Detail |
public void handleStatusChanged(Handle hdl)
handleStatusChanged in interface Selectorhdl - the Handle who's blocking status has changed.
java.lang.IllegalArgumentException - if hdl is null.Selector.select(),
Handle.addSelector(org.jumpi.spi.Selector),
Handle.removeSelector(org.jumpi.spi.Selector)public void addHandle(Handle hdl)
addHandle in interface Selectorhdl - the Handle to add to the managed list.
java.lang.IllegalArgumentException - if hdl is null or not implementing
org.jumpi.spi.Handle interface.public void addHandle(Handle hdl)
hdl - the Handle to add to the managed list.
java.lang.IllegalArgumentException - if hdl is null.Handle.addSelector(org.jumpi.spi.Selector)public void removeHandle(Handle hdl)
removeHandle in interface Selectorhdl - the Handle to remove from the Selector's list of managed
Handles.
java.lang.IllegalArgumentException - if hdl is null or not implementing
org.jumpi.spi.Handle interface.public void removeHandle(Handle hdl)
hdl - the Handle to remove from the Selector's list of managed
Handles.
java.lang.IllegalArgumentException - if hdl is null.Handle.addSelector(org.jumpi.spi.Selector)public java.util.Vector removeNonBlockingHandles()
removeNonBlockingHandles in interface Selectorpublic Handle removeNonBlockingHandle()
removeNonBlockingHandle in interface Selectorpublic java.util.Vector removeBlockingHandles()
removeBlockingHandles in interface Selectorpublic Handle removeBlockingHandle()
removeBlockingHandle in interface Selectorpublic void select()
select in interface Selectorpublic void select(long timeout)
select in interface Selectortimeout - the timeout interval in milliseconds. No wait if smaller
or equal to 0.public java.util.Vector getNonBlockingHandles()
getNonBlockingHandles in interface Selectorpublic java.util.Vector getBlockingHandles()
getBlockingHandles in interface Selectorpublic java.util.Vector getAllHandles()
getAllHandles in interface Selectorpublic int size()
size in interface Selectorpublic void clear()
clear in interface Selector
|
Jumpi v1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||