com.cometway.xml
Class ObjectManagerArchiver

java.lang.Object
  extended by com.cometway.props.Props
      extended by com.cometway.ak.Agent
          extended by com.cometway.ak.ScheduledAgent
              extended by com.cometway.xml.ObjectManagerArchiver
All Implemented Interfaces:
AgentInterface, HasStateMachineModel, ISchedulable

public class ObjectManagerArchiver
extends ScheduledAgent


Field Summary
protected  java.lang.String EOL
           
protected  IObjectManager om
           
protected  java.lang.Object[] synchObject
           
 
Fields inherited from class com.cometway.ak.ScheduledAgent
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
ObjectManagerArchiver()
           
 
Method Summary
 void initProps()
          Override this method to provide default properties for subclasses.
 void loadArchive()
           
 void saveArchive()
           
 void start()
          Creates a Schedule as specified by the schedule property and schedules this agent.
 void stop()
          Unschedules this agent.
 void wakeup()
          Override this method to handle schedule wakeup notifications.
 
Methods inherited from class com.cometway.ak.ScheduledAgent
addScheduleChangeListener, getSchedule, removeScheduleChangeListener, schedule, unschedule
 
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 com.cometway.props.Props
addListener, append, copy, copyFrom, copyTo, decrementInteger, dump, enableListeners, enumerateKeys, format, getBoolean, getByteArray, getCharacter, getDate, getDate, getDateString, getDouble, getFloat, getHexString, getInteger, getKeys, getLong, getNextKey, getProperty, getProperty, getPropsContainer, getSize, getString, getString, getTokens, getTokens, getTrimmedString, getVector, hasProperty, incrementInteger, insertProps, loadProps, notifyPropsChanged, notifyPropsChangedIgnore, notifyPropsChangedIgnore, parse, propertyMatchesRegEx, readFromFile, regExPropertyMatches, removeAll, removeListener, removeProperty, resumeNotify, saveProps, set, setBoolean, setCharacter, setDefault, setDouble, setFloat, setInteger, setLong, setProperty, setProperty, setProperty, setPropsContainer, suspendNotify, writeToFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EOL

protected final java.lang.String EOL

synchObject

protected final java.lang.Object[] synchObject

om

protected IObjectManager om
Constructor Detail

ObjectManagerArchiver

public ObjectManagerArchiver()
Method Detail

initProps

public void initProps()
Description copied from class: ScheduledAgent
Override this method to provide default properties for subclasses. ScheduledAgent recognizes the following properties: schedule (scheduled string or none) agent_classname and agent_name (used by default wakeup implementation to instantiate and start a new agent based on this agent's properties).

Specified by:
initProps in interface AgentInterface
Overrides:
initProps in class ScheduledAgent

start

public void start()
Description copied from class: ScheduledAgent
Creates a Schedule as specified by the schedule property and schedules this agent.

Specified by:
start in interface AgentInterface
Overrides:
start in class ScheduledAgent

stop

public void stop()
Description copied from class: ScheduledAgent
Unschedules this agent.

Specified by:
stop in interface AgentInterface
Overrides:
stop in class ScheduledAgent

wakeup

public void wakeup()
Description copied from class: ScheduledAgent
Override this method to handle schedule wakeup notifications. By default this agent will create and start a new agent based on the properties of this agent and: 1) agent_classname, the java class name of the agent instance to be created, 2) agent_name, the name property assigned to the new agent instance, 3) agent_id, the unique id property assigned to the new agent instance. The wakeup driven agents are only started (not stopped) and if they have a problem during execution (exception thrown) this agent would be unscheduled automatically.

Specified by:
wakeup in interface ISchedulable
Overrides:
wakeup in class ScheduledAgent

loadArchive

public void loadArchive()

saveArchive

public void saveArchive()