public class SimpleScheduler extends Object implements EventDispatcher, Serializable
EventDispatcher implementation that can schedule delayed
<send> events for the "scxml" targettype
attribute value (which is also the default). This implementation uses
J2SE Timers.
No other targettypes are processed. Subclasses may support
additional targettypes by overriding the
send(...) and cancel(...) methods and
delegating to their super counterparts for the
"scxml" targettype.
| Constructor and Description |
|---|
SimpleScheduler(SCXMLExecutor executor)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(String sendId)
Cancel the specified send message.
|
protected SCXMLExecutor |
getExecutor()
Get the executor we're attached to.
|
protected org.apache.commons.logging.Log |
getLog()
Get the log instance.
|
protected Map |
getTimers()
Get the current timers.
|
void |
send(String sendId,
String target,
String targettype,
String event,
Map params,
Object hints,
long delay,
List externalNodes)
Send this message to the target.
|
public SimpleScheduler(SCXMLExecutor executor)
executor - The owning SCXMLExecutor instance.public void cancel(String sendId)
EventDispatchercancel in interface EventDispatchersendId - The ID of the send message to cancelEventDispatcher.cancel(String)public void send(String sendId, String target, String targettype, String event, Map params, Object hints, long delay, List externalNodes)
EventDispatchersend in interface EventDispatchersendId - The ID of the send messagetarget - An expression returning the target location of the eventtargettype - The type of the Event I/O Processor that the event
should be dispatched toevent - The type of event being generated.params - A list of zero or more whitespace separated variable
names to be included with the event.hints - 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 elapsesexternalNodes - The list of external nodes associated with
the <send> element.EventDispatcher.send(String,String,String,String,Map,Object,long,List)protected org.apache.commons.logging.Log getLog()
protected Map getTimers()
protected SCXMLExecutor getExecutor()
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.