com.cometway.props
Class PropsListAgent

java.lang.Object
  extended by com.cometway.props.Props
      extended by com.cometway.ak.Agent
          extended by com.cometway.ak.ServiceAgent
              extended by com.cometway.props.PropsListAgent
All Implemented Interfaces:
AgentInterface, HasStateMachineModel
Direct Known Subclasses:
XMLPropsList

public class PropsListAgent
extends ServiceAgent

This agent creates and registers a PropsList to the service manager. It can be extended to provide alternate storage layers, or used externally with associated Import and Export agents.


Field Summary
protected  PropsList propsList
           
 
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
PropsListAgent()
           
 
Method Summary
 void initProps()
          Default properties: service_name = database (name this PropsList registers with the Service Manager).
 void start()
          Creates a PropsChangeListener for this agent and registers with the Service Manager using service_name.
 void stop()
          Unregister this agent with the Service Manager and sets internal state variables to null.
 
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

propsList

protected PropsList propsList
Constructor Detail

PropsListAgent

public PropsListAgent()
Method Detail

initProps

public void initProps()
Default properties:
 service_name = database (name this PropsList registers with the Service Manager).

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

start

public void start()
Creates a PropsChangeListener for this agent and registers with the Service Manager using service_name.

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

stop

public void stop()
Unregister this agent with the Service Manager and sets internal state variables to null. All Props references are permanently lost.

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