public class Emitter
The event emitter which is ported from the JavaScript module. This class is thread-safe.
Modifier and Type | Method and Description |
---|---|
Emitter |
emit()
Executes each of listeners with the given args.
|
boolean |
hasListeners()
Check if this emitter has listeners for the specified event.
|
java.util.List<com.apizee.apiRTC.Emitter.Listener> |
listeners()
Returns a list of listeners for the specified event.
|
Emitter |
off()
Removes all registered listeners.
|
Emitter |
off()
Removes all listeners of the specified event.
|
Emitter |
off()
Removes the listener.
|
Emitter |
on()
Listens on the event.
|
Emitter |
once()
Adds a one time listener for the event.
|
public Emitter on()
Listens on the event.
public Emitter once()
Adds a one time listener for the event.
public Emitter off()
Removes all registered listeners.
public Emitter off()
Removes all listeners of the specified event.
public Emitter off()
Removes the listener.
public Emitter emit()
Executes each of listeners with the given args.
public java.util.List<com.apizee.apiRTC.Emitter.Listener> listeners()
Returns a list of listeners for the specified event.
public boolean hasListeners()
Check if this emitter has listeners for the specified event.