|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--psl.worklets.JunctionPlanner
Provides meta-information pertaining to a Worklet Junction. Make
sure you call init(WorkletJunction) before the
WorkletJunction uses the JunctionPlanner.
Notes
| Field Summary | |
private java.util.Date |
_date
Date to execute at. |
private long |
_interval
Time to wait between iterations (in milliseconds, default = 0). |
private int |
_iterations
Number of times to execute (default = 1) |
private psl.worklets.WorkletJunction |
_parent
Reference to the WorkletJunction associated with the JunctionPlanner |
private int |
_state
Current state of the WorkletJunction |
private java.lang.Object |
_system
The host adapter that acts as a reference to the target system |
private java.util.Timer |
_timer
Timer associated with keeping track of the delay between iterations. |
private java.util.TimerTask |
_timerTask
TimerTask associated with the Timer |
private boolean |
_timerTask_done
Checks whether the TimerTask has been canceled. |
private psl.worklets.WVM |
_wvm
The local WVM. |
static int |
STATE_READY
WorkletJunction is ready to be run |
static int |
STATE_RUNNING
WorkletJunction is running |
static int |
STATE_TERMINATED
WorkletJunction is terminated |
static int |
STATE_WAIT_INDEF
WorkletJunction is waiting for an indefinite period of time |
static int |
STATE_WAITING
WorkletJunction is waiting for a predetermined period of time |
| Constructor Summary | |
|
JunctionPlanner(java.util.Date date)
dp2041 Creates a JunctionPlanner to execute the given number of iterations at every Date |
|
JunctionPlanner(int iterations,
long interval)
Creates a JunctionPlanner to execute the given number of iterations at every interval |
private |
JunctionPlanner(int iterations,
long interval,
java.util.Date date)
Private general constructor used by other public constructors |
| Method Summary | |
private void |
_wait()
My implementation of a wait function that also keeps track of the state of the WorkletJunction |
(package private) void |
cancel()
Cancel a WorkletJunction from further execution |
(package private) java.util.Date |
date()
Gets the current Date at which to execute |
(package private) void |
init(psl.worklets.WorkletJunction parent)
Initialize the JunctionPlanner by giving it a reference to the corresponding WorkletJunction |
(package private) long |
interval()
Gets the current interval value |
(package private) int |
iterations()
Gets the current number of iterations left to execute |
(package private) void |
setDate(java.util.Date date)
Resets the Date at which to execute |
(package private) void |
setInterval(long interval)
Resets the interval value |
(package private) void |
setIterations(int i)
Resets the number of iterations to execute |
(package private) void |
setState(int state)
Sets the state of the WorkletJunction |
(package private) java.lang.String |
sstate()
Gets the string meaning of the state |
(package private) void |
start()
Starts up the Junction Planner. |
(package private) int |
state()
return the current state of the WorkletJunction |
(package private) void |
wakeUp()
Wakup a JunctionPlanner in the waiting state ( STATE_WAITING or STATE_WAIT_INDEF) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int STATE_READY
WorkletJunction is ready to be run
public static final int STATE_WAITING
WorkletJunction is waiting for a predetermined period of time
public static final int STATE_WAIT_INDEF
WorkletJunction is waiting for an indefinite period of time
public static final int STATE_RUNNING
WorkletJunction is running
public static final int STATE_TERMINATED
WorkletJunction is terminated
private transient psl.worklets.WVM _wvm
WVM.
private transient java.lang.Object _system
private psl.worklets.WorkletJunction _parent
WorkletJunction associated with the JunctionPlanner
private int _state
WorkletJunction
private int _iterations
private long _interval
private java.util.Date _date
Date to execute at.
private java.util.Timer _timer
Timer associated with keeping track of the delay between iterations.
private java.util.TimerTask _timerTask
TimerTask associated with the Timer
private boolean _timerTask_done
TimerTask has been canceled.
| Constructor Detail |
private JunctionPlanner(int iterations,
long interval,
java.util.Date date)
public JunctionPlanner(int iterations,
long interval)
public JunctionPlanner(java.util.Date date)
Date
| Method Detail |
void init(psl.worklets.WorkletJunction parent)
WorkletJunction
void start()
WorkletJunction to use the JunctionPlanner.
private void _wait()
WorkletJunction
void wakeUp()
STATE_WAITING or STATE_WAIT_INDEF)
void cancel()
WorkletJunction from further execution
void setIterations(int i)
int iterations()
void setDate(java.util.Date date)
Date at which to execute
java.util.Date date()
Date at which to execute
Date at which to executevoid setInterval(long interval)
long interval()
void setState(int state)
state - int state()
WorkletJunction
WorkletJunctionjava.lang.String sstate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||