public class SimpleDispatcher extends Object implements EventDispatcher, Serializable
EventDispatcher implementation that can schedule delay
ed
<send> events for the "scxml" type
attribute value (which is also the default). This implementation uses
J2SE Timer
s.
No other type
s are processed. Subclasses may support
additional type
s by overriding the
send(...)
and cancel(...)
methods and
delegating to their super
counterparts for the
"scxml" type
.
Constructor and Description |
---|
SimpleDispatcher() |
Modifier and Type | Method and Description |
---|---|
void |
cancel(String sendId)
Cancel the specified send message.
|
protected org.apache.commons.logging.Log |
getLog()
Get the log instance.
|
protected Map<String,Timer> |
getTimers()
Get the current timers.
|
void |
send(Map<String,SCXMLIOProcessor> ioProcessors,
String id,
String target,
String type,
String event,
Object data,
Object hints,
long delay)
Send this message to the target.
|
protected void |
setLog(org.apache.commons.logging.Log log)
Sets the log instance
|
public SimpleDispatcher()
protected org.apache.commons.logging.Log getLog()
protected void setLog(org.apache.commons.logging.Log log)
log
- the new log instanceprotected Map<String,Timer> getTimers()
public void cancel(String sendId)
EventDispatcher
cancel
in interface EventDispatcher
sendId
- The ID of the send message to cancelEventDispatcher.cancel(String)
public void send(Map<String,SCXMLIOProcessor> ioProcessors, String id, String target, String type, String event, Object data, Object hints, long delay)
EventDispatcher
send
in interface EventDispatcher
ioProcessors
- the available SCXMLIOProcessors, the same map as the SCXML system variable _ioprocessorsid
- The ID of the send messagetarget
- An expression returning the target location of the eventtype
- The type of the Event I/O Processor that the event should
be dispatched toevent
- The type of event being generated.data
- The event payloadhints
- The data containing information which may be
used by the implementing platform to configure the event processordelay
- The event is dispatched after the delay interval elapsesEventDispatcher.send(java.util.Map, String, String, String, String, Object, Object, long)
Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.