|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.primordion.xholon.base.Xholon org.primordion.xholon.base.XholonWithPorts org.primordion.xholon.base.XholonTime
Handle time in a Xholon application.
Field Summary | |
static int |
timeStep
Current time step. |
static int |
timeStepInterval
Time step interval. |
static IXholon |
xhtXholonTime
|
Fields inherited from class org.primordion.xholon.base.XholonWithPorts |
port |
Fields inherited from class org.primordion.xholon.base.Xholon |
DEFAULT_LEVEL, interaction, interactionsEnabled |
Fields inherited from interface org.primordion.xholon.base.IXholonTime |
NUM_MILLISECONDS_PER_SECOND, TIMERTYPE_ABSOLUTE, TIMERTYPE_RELATIVE, TIMERTYPE_REPEAT |
Fields inherited from interface org.primordion.xholon.base.IXholon |
DEFAULT_SIZE_MSG_Q, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx |
Constructor Summary | |
XholonTime()
constructor |
Method Summary | |
void |
cancel(XholonTimerTask xhTimerTask)
Cancel a relative, repeat or absolute timeout. |
void |
cancelAll()
Cancel all timeouts. |
java.lang.String |
getName()
Get name, unique within this application, of this Xholon instance. |
static int |
getTimeStep()
Get the current time step of the executing application. |
static int |
getTimeStepInterval()
Get time step interval defined for this application. |
static void |
setTimeStep(int ts)
Set the current time step of the executing application. |
static void |
setTimeStepInterval(int tsInterval)
Set time step interval defined for this application. |
static void |
sleep(long delay)
|
XholonTimerTask |
timeoutAbsolute(IXholon clientNode,
java.util.Date time)
Timeout at a specified absolute time in the future. |
XholonTimerTask |
timeoutRelative(IXholon clientNode,
long delay)
Timeout after a specified number of milliseconds, relative to the current time. |
XholonTimerTask |
timeoutRelative(IXholon clientNode,
java.lang.Object data,
long delay)
Timeout after a specified number of milliseconds, relative to the current time. |
XholonTimerTask |
timeoutRepeat(IXholon clientNode,
long delay,
long period)
Timeout repeatedly every so many milliseconds. |
XholonTimerTask |
timeoutRepeat(IXholon clientNode,
java.lang.Object data,
long delay,
long period)
Timeout repeatedly every so many milliseconds. |
Methods inherited from class org.primordion.xholon.base.XholonWithPorts |
configure, getMaxPorts, getPort, initialize, isActiveObject, isBound, isContainer, isPassiveObject, postConfigure, setMaxPorts, setPorts, terminate |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static IXholon xhtXholonTime
public static int timeStepInterval
public static int timeStep
Constructor Detail |
public XholonTime()
Method Detail |
public static void setTimeStepInterval(int tsInterval)
tsInterval
- Time step interval in ms.public static int getTimeStepInterval()
public static void setTimeStep(int ts)
ts
- The current time step.public static int getTimeStep()
public XholonTimerTask timeoutRelative(IXholon clientNode, long delay)
IXholonTime
timeoutRelative
in interface IXholonTime
clientNode
- The xholon client node that will receive a message when the timeout occurs.delay
- The number of milliseconds to wait before timing out.public XholonTimerTask timeoutRelative(IXholon clientNode, java.lang.Object data, long delay)
IXholonTime
timeoutRelative
in interface IXholonTime
clientNode
- The xholon client node that will receive a message when the timeout occurs.data
- User data to return as part of the message when the timeout occurs.delay
- The number of milliseconds to wait before timing out.public XholonTimerTask timeoutRepeat(IXholon clientNode, long delay, long period)
IXholonTime
timeoutRepeat
in interface IXholonTime
clientNode
- The xholon client node that will receive a message each time the timeout occurs.delay
- The number of milliseconds to delay before the first timeout occurs.period
- The number of milliseconds in each timeout period, after the first timeout.public XholonTimerTask timeoutRepeat(IXholon clientNode, java.lang.Object data, long delay, long period)
IXholonTime
timeoutRepeat
in interface IXholonTime
clientNode
- The xholon client node that will receive a message each time the timeout occurs.data
- User data to return as part of the message when the timeout occurs.delay
- The number of milliseconds to delay before the first timeout occurs.period
- The number of milliseconds in each timeout period, after the first timeout.public XholonTimerTask timeoutAbsolute(IXholon clientNode, java.util.Date time)
IXholonTime
timeoutAbsolute
in interface IXholonTime
time
- The absolute time and date at which the timeout will occur.clientNode
- The xholon client node that will receive a message when the timeout occurs.public void cancel(XholonTimerTask xhTimerTask)
IXholonTime
cancel
in interface IXholonTime
public void cancelAll()
IXholonTime
cancelAll
in interface IXholonTime
public static void sleep(long delay)
public java.lang.String getName()
IXholon
getName
in interface IXholon
getName
in class Xholon
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |