|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
An interface for the ListenerSupport class (experimental).
| Method Summary | |
void |
addListener(Listener listener)
Add a listener to the listeners set. |
int |
countListeners()
Count the registered listeners. |
long |
getReceiveTimeout()
Return the the amount of time(in ms.) a
Listeneris given to exit gracefully from the
Listener.receive(Signal)method when it's
removeListener(Listener).
|
boolean |
isRegistered(Listener listener)
Check whether a listener is registered or not. |
void |
notify(Signal signal)
Broadcast a signal. |
void |
removeAllListeners()
Unconditionally unregister all the listeners. |
void |
removeListener(Listener listener)
Remove a listener from the listeners set. |
void |
setReceiveTimeout(long receiveTimeout)
Set the the amount of time(in ms.) a
Listeneris given to exit gracefully from the
Listener.receive(Signal)method when it's
removeListener(Listener).
|
| Method Detail |
public void addListener(Listener listener)
listener - the listener to add
public void removeListener(Listener listener)
throws BlockedListenerException
listener - the listener to remove
BlockedListenerException - if the listener is blocked and cannot be removedpublic void removeAllListeners()
public boolean isRegistered(Listener listener)
listener - the listener to check
public void notify(Signal signal)
public int countListeners()
countListeners()public long getReceiveTimeout()
time(in ms.) a
Listeneris given to exit gracefully from the
Listener.receive(Signal)method when it's
removeListener(Listener).
Note that this timeout does not apply to normal operations (i.e. a listener can normally block for how long it wants) but only when a listener is removed.
public void setReceiveTimeout(long receiveTimeout)
time(in ms.) a
Listeneris given to exit gracefully from the
Listener.receive(Signal)method when it's
removeListener(Listener).
Note that this timeout does not apply to normal operations (i.e. a listener can normally block for how long it wants) but only when a listener is removed.
receiveTimeout - the timeout in milliseconds
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||