|
|||||||||
| 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.ServiceAgent
com.cometway.om.ObjectManager
public class ObjectManager
Reference implementation of a non-persistent IObjectManager as an agent. Normal operations are reported through debug for educational purposes. You should want to add the hide_debug=true property during normal use.
| Field Summary | |
|---|---|
protected java.util.Hashtable |
types
|
protected int |
uniqueID
|
| 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 |
| Fields inherited from interface com.cometway.om.IObjectManager |
|---|
LIST_SUPPORTED_TYPES, LIST_TYPES |
| Constructor Summary | |
|---|---|
ObjectManager()
|
|
| Method Summary | |
|---|---|
boolean |
changeObjectID(ObjectID oldID,
ObjectID newID)
This method changes an object's ObjectID. |
ObjectID |
createObject(ObjectType type)
Creates a new object in the object manager of the specified object type. |
java.lang.Object |
getObject(ObjectID id)
Retrieves the object corresponding to an object ID. |
static IObjectManager |
getObjectManager()
Returns a reference to the IObjectManager registered as object_manager. |
static IObjectManager |
getObjectManager(java.lang.String serviceName)
Returns a reference to the IObjectManager registered as the specified service name. |
void |
initProps()
Sets the service_name property to object_manager if a value was not provided. |
java.util.Vector |
listObjects(java.lang.Object objectQuery)
Returns a Vector of objects designated by the objectQuery parameter. |
boolean |
removeObject(ObjectID id)
Deletes the object corresponding to an object ID from the object manager. |
void |
start()
Starts and registers the object cache. |
void |
stop()
Stops and unregisters the object cache. |
| 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 java.util.Hashtable types
protected int uniqueID
| Constructor Detail |
|---|
public ObjectManager()
| Method Detail |
|---|
public void initProps()
initProps in interface AgentInterfaceinitProps in class Agentpublic void start()
start in interface AgentInterfacestart in class ServiceAgentpublic void stop()
stop in interface AgentInterfacestop in class ServiceAgent
public boolean changeObjectID(ObjectID oldID,
ObjectID newID)
changeObjectID in interface IObjectManagerpublic ObjectID createObject(ObjectType type)
Note: Currently, only the PropsType is supported.
createObject in interface IObjectManagertype - a reference to an ObjectType representing the type of object to create.
public java.lang.Object getObject(ObjectID id)
getObject in interface IObjectManagerid - a reference to an ObjectID representing a valid object in the object manager.
public java.util.Vector listObjects(java.lang.Object objectQuery)
| IObjectManager.LIST_TYPES | Lists object types that already exist. |
| IObjectManager.LIST_SUPPORTED_TYPES | Lists objects which can be passed to createObject. |
| ObjectType | Lists all existing objects of the same ObjectType. |
| PropsQuery | Lists Props based on data from the PropsQuery object. |
listObjects in interface IObjectManagerobjectQuery - any valid object from the list above.
public boolean removeObject(ObjectID id)
removeObject in interface IObjectManagerid - a reference to an ObjectID representing a valid object in the object manager.
public static IObjectManager getObjectManager()
public static IObjectManager getObjectManager(java.lang.String serviceName)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||