PkgAgentSystem
Class AgentTimerQueue
java.lang.Object
|
+--FIM.Util.Threads.TimerQueue
|
+--PkgAgentSystem.AgentTimerQueue
- class AgentTimerQueue
- extends TimerQueue
- implements TimerAction
An extension of a TimerQueue
where the method doTimerAction
calls the same
method in the agent system provided at creatiom.
This class is necessary, so doTimerAction in AgentSystem can have package access.
Otherwise it would have to be public to implement TimerAction and could be
accessed by every agent, which might be a security problem.
- Version:
- 1.0, 1.7.2000
- Author:
- Michael Sonntag
Method Summary |
long |
addAfterIntervalAction(int afterSecondsInterval)
Creates a new event which will happen after the passed in number of seconds. |
long |
addAtTimeAction(Date atTime)
Creates a new event at a specified time. |
void |
doTimerAction(long id)
Implementation of interface TimerAction .
|
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
AgentTimerQueue
public AgentTimerQueue(AgentSystem system)
- Create a new timer queue for the provided system
- Parameters:
system
- the agent system to notify
doTimerAction
public void doTimerAction(long id)
- Implementation of interface
TimerAction
.
Calls doTimerAction
in the associated agent system.
- Specified by:
- doTimerAction in interface TimerAction
- Parameters:
id
- the id of the event- See Also:
TimerAction
,
AgentSystem.doTimerAction(long)
addAtTimeAction
public long addAtTimeAction(Date atTime)
- Creates a new event at a specified time.
- Parameters:
atTime
- the time this event shall occur on- Returns:
- the id of this event
addAfterIntervalAction
public long addAfterIntervalAction(int afterSecondsInterval)
- Creates a new event which will happen after the passed in number of seconds.
- Parameters:
afterSecondsInterval
- interval in seconds till the event occurs- Returns:
- the id of this event
Submit a bug
Copyright 2000 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.