public class EventEmitterImpl extends Object implements EventEmitter
| Constructor and Description |
|---|
EventEmitterImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
emit(String eventName)
Will trigger the event callback if any on the given event.
|
void |
on(String eventName,
Runnable callback)
Register a callback for an event.
|
public void on(String eventName, Runnable callback)
EventEmitteron in interface EventEmittereventName - the event namecallback - the action to performpublic void emit(String eventName)
EventEmitteremit in interface EventEmittereventName - the event.Copyright © 2019. All rights reserved.