|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.media.server.spi.listener.Listeners<L>
public class Listeners<L extends Listener>
Implements collection of listener. Allows concurrently modify list.
| Constructor Summary | |
|---|---|
Listeners()
Creates list of listeners with default size of 10. |
|
Listeners(int size)
Creates list of listeners with specified size. |
|
| Method Summary | |
|---|---|
void |
add(L listener)
Adds listener to the collection. |
void |
clear()
Removes all listeners. |
boolean |
dispatch(Event event)
Dispatched event to all registered listeners. |
void |
remove(Listener listener)
Removes listener from the collection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Listeners()
public Listeners(int size)
size - the size of list reserved for list.| Method Detail |
|---|
public void add(L listener)
throws TooManyListenersException
listener - the listener to be added
TooManyListenersExceptionpublic void remove(Listener listener)
listener - the listener to be removed.public void clear()
public boolean dispatch(Event event)
event - the event to be dispatched
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||