|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.props.Props
com.cometway.ak.Agent
com.cometway.ak.ScheduledAgent
public class ScheduledAgent
Implementation of a scheduled agent. Subclass this agent and override the wakeup method that is called as specified by the schedule property. Creates and uses a Schedule as specified by the schedule property.
| Field Summary | |
|---|---|
protected ISchedule |
schedule
|
| Fields inherited from class com.cometway.ak.Agent |
|---|
agent_id, agentController, CREATING_STATE, debugReporter, DESTROYED_STATE, DESTROYING_STATE, errorReporter, FAILED_STATE, printlnReporter, props, RUNNING_STATE, STARTING_STATE, STOPPED_STATE, STOPPING_STATE, warningReporter |
| Constructor Summary | |
|---|---|
ScheduledAgent()
|
|
| Method Summary | |
|---|---|
boolean |
addScheduleChangeListener(IScheduleChangeListener l)
Listeners are not implemented. |
ISchedule |
getSchedule()
Returns a reference to the schedule instance. |
void |
initProps()
Override this method to provide default properties for subclasses. |
boolean |
removeScheduleChangeListener(IScheduleChangeListener l)
Listeners are not implemented. |
protected boolean |
schedule()
Creates a Schedule as specified by the schedule property and schedules this agent. |
void |
start()
Creates a Schedule as specified by the schedule property and schedules this agent. |
void |
stop()
Unschedules this agent. |
protected boolean |
unschedule()
Unschedules this agent. |
void |
wakeup()
Override this method to handle schedule wakeup notifications. |
| Methods inherited from class com.cometway.ak.Agent |
|---|
currentStateEquals, debug, destroy, error, error, getAgentController, getDateTimeStr, getProps, getServiceImpl, getStateMachineModel, println, register, registerService, setAgentController, setProps, toString, unregister, unregisterService, warning, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ISchedule schedule
| Constructor Detail |
|---|
public ScheduledAgent()
| Method Detail |
|---|
public void initProps()
initProps in interface AgentInterfaceinitProps in class Agentpublic void start()
start in interface AgentInterfacestart in class Agentpublic void stop()
stop in interface AgentInterfacestop in class Agentprotected boolean schedule()
protected boolean unschedule()
public boolean addScheduleChangeListener(IScheduleChangeListener l)
addScheduleChangeListener in interface ISchedulablel - a reference to an IScheduleChangeListener.
public ISchedule getSchedule()
getSchedule in interface ISchedulablepublic boolean removeScheduleChangeListener(IScheduleChangeListener l)
removeScheduleChangeListener in interface ISchedulablel - a reference to an IScheduleChangeListener.
public void wakeup()
wakeup in interface ISchedulable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||