public final class EventBus
extends java.lang.Object
EventSubscribers can indicate their interest in a certain event
type by registering via subscribe(String, EventSubscriber). Events
can be published to all EventSubscribers via
publish(JVoiceXMLEvent).| Constructor and Description |
|---|
EventBus()
Constructs a new object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
publish(JVoiceXMLEvent event)
Publishes the given event to all registered subscribers.
|
void |
subscribe(java.lang.String type,
EventSubscriber subscriber)
Subscribes the given subscriber for the given event type or subtypes.
|
boolean |
unsubscribe(java.lang.String type,
EventSubscriber subscriber)
Unsubscribes the given subscriber from the given event type.
|
public void subscribe(java.lang.String type,
EventSubscriber subscriber)
BadFetchError would include
a subscription to events of the type
BadFetchHttpResponsecodeError.type - the event typesubscriber - the subscriberpublic boolean unsubscribe(java.lang.String type,
EventSubscriber subscriber)
type - the event typesubscriber - the subscribertrue if the subscription was removedpublic void publish(JVoiceXMLEvent event)
event - the event to publish