public final class JVoiceXmlEventHandler extends java.lang.Object implements EventHandler
ImplementationPlatform via the
EventBus. This event handler can catch only one
event at a time. The first event is propagated to the the FIA while
subsequent events will be ignored.ImplementationPlatform| Constructor and Description |
|---|
JVoiceXmlEventHandler(DataModel dataModel,
ScopeObserver observer)
Construct a new object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addStrategy(EventStrategy strategy)
Adds a strategy for the given event type.
|
void |
clean(FormItem item)
Removes all event handlers that were collected for the given form item.
|
void |
clearEvent()
Removes all cached events that have been received.
|
void |
collect(VoiceXmlInterpreterContext context,
VoiceXmlInterpreter interpreter,
Dialog dialog)
Adds all event handlers defined in the given dialog.
|
java.util.Collection<EventStrategy> |
collect(VoiceXmlInterpreterContext context,
VoiceXmlInterpreter interpreter,
FormInterpretationAlgorithm fia,
CatchContainer item)
Adds all event handlers defined in the given input item.
|
void |
collect(VoiceXmlInterpreterContext context,
VoiceXmlInterpreter interpreter,
org.jvoicexml.xml.vxml.VoiceXmlDocument document)
Adds all event handlers defined in the given document.
|
JVoiceXMLEvent |
getEvent()
Retrieves the event.
|
void |
onEvent(JVoiceXMLEvent e)
Notification about the given event.
|
void |
processEvent(CatchContainer item)
Processes the last received event.
|
boolean |
removeStrategies(java.util.Collection<EventStrategy> strats)
Removes the given strategies.
|
JVoiceXMLEvent |
waitEvent()
Waits until an event was generated in the implementation platform.
|
public JVoiceXmlEventHandler(DataModel dataModel, ScopeObserver observer)
dataModel - the emplyoed data modelobserver - the scope observer.public void collect(VoiceXmlInterpreterContext context, VoiceXmlInterpreter interpreter, org.jvoicexml.xml.vxml.VoiceXmlDocument document)
collect in interface EventHandlercontext - the current VoiceXmlInterpreterContextinterpreter - the current VoiceXmlInterpreterdocument - the document to inspect.public void collect(VoiceXmlInterpreterContext context, VoiceXmlInterpreter interpreter, Dialog dialog)
collect in interface EventHandlercontext - the current VoiceXmlInterpreterContextinterpreter - the current VoiceXmlInterpreterdialog - the dialog to inspect.public java.util.Collection<EventStrategy> collect(VoiceXmlInterpreterContext context, VoiceXmlInterpreter interpreter, FormInterpretationAlgorithm fia, CatchContainer item)
collect in interface EventHandlercontext - the current VoiceXmlInterpreterContextinterpreter - the current VoiceXmlInterpreterfia - the current FIA.item - the form item to inspect.public boolean addStrategy(EventStrategy strategy)
addStrategy in interface EventHandlerstrategy - the strategy to add.true if the strategy was added.public void clean(FormItem item)
clean in interface EventHandleritem - the form itempublic JVoiceXMLEvent waitEvent()
waitEvent in interface EventHandlerpublic void processEvent(CatchContainer item) throws JVoiceXMLEvent
EventStrategy is determined via a
chaining of EventFilters.processEvent in interface EventHandleritem - The current form item.JVoiceXMLEvent - Error or event processing the event or there was no handler
to process the current eventpublic void clearEvent()
clearEvent in interface EventHandlerpublic void onEvent(JVoiceXMLEvent e)
EventBus and
handle form interpretation.onEvent in interface EventSubscribere - the eventpublic JVoiceXMLEvent getEvent()
getEvent in interface EventHandlerpublic boolean removeStrategies(java.util.Collection<EventStrategy> strats)
removeStrategies in interface EventHandlerstrats - strategies to removetrue if at least one strategy was removed