Class SpaceObject
- java.lang.Object
- 
- jadex.commons.SimplePropertyObject
- 
- jadex.commons.meta.TypedPropertyObject
- 
- jadex.extension.envsupport.environment.SynchronizedPropertyObject
- 
- jadex.extension.envsupport.environment.SpaceObject
 
 
 
 
- 
- All Implemented Interfaces:
- IPropertyObject,- ITypedPropertyObject,- ISpaceObject
 
 public class SpaceObject extends SynchronizedPropertyObject implements ISpaceObject Default implementation of a space object.
- 
- 
Field SummaryFields Modifier and Type Field Description protected SimpleValueFetcherfetcherThe fetcher.protected java.lang.ObjectidThe object's ID.protected AbstractEnvironmentSpacespaceThe space.protected MultiCollection<java.lang.Object,IResultListener<?>>tasklistenersThe task listeners.protected java.util.MaptasksThe object's tasks.protected java.lang.StringtypenameThe object's typename.- 
Fields inherited from class jadex.extension.envsupport.environment.SynchronizedPropertyObjectmonitor
 - 
Fields inherited from class jadex.commons.SimplePropertyObjectpcs, properties
 - 
Fields inherited from interface jadex.extension.envsupport.environment.ISpaceObjectPROPERTY_OWNER
 
- 
 - 
Constructor SummaryConstructors Constructor Description SpaceObject(java.lang.Object id, MObjectType type, java.util.Map properties, java.util.List tasks, java.lang.Object monitor, AbstractEnvironmentSpace space)Creates a new EnvironmentObject.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTask(IObjectTask task)Adds a new task for the object.voidaddTaskListener(java.lang.Object taskid, IResultListener listener)Add a result listener to a task.voidclearTasks()Removes all tasks from the object.java.lang.ObjectgetId()Get the objects id.java.util.MapgetProperties()Bean accessor.java.lang.ObjectgetProperty(java.lang.String name)Returns a property.IObjectTaskgetTask(java.lang.Object id)Get a specific task.java.util.CollectiongetTasks()Returns all tasks of the object for introspection.java.lang.StringgetType()Returns the type of the object.booleanhasProperty(java.lang.String name)Test if has a property.voidremoveTask(java.lang.Object taskid, java.lang.Exception e)Removes a task from the object.voidremoveTaskListener(java.lang.Object taskid, IResultListener listener)Remove a result listener from a task.voidsetId(java.lang.Object id)Set the id of the object.voidsetProperty(java.lang.String name, java.lang.Object value)Only for debugging.voidsetType(java.lang.String type)Set the type of the object.java.lang.StringtoString()Get the string representation.voidupdateObject(IEnvironmentSpace space, long progress, IClockService clock)Updates the object to the current time.- 
Methods inherited from class jadex.extension.envsupport.environment.SynchronizedPropertyObjectaddPropertyChangeListener, getMonitor, getPropertyNames, removePropertyChangeListener
 - 
Methods inherited from class jadex.commons.meta.TypedPropertyObjectgetMetaData, getMetaDatas
 - 
Methods inherited from class jadex.commons.SimplePropertyObjectsetProperties
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface jadex.commons.IPropertyObjectgetPropertyNames
 - 
Methods inherited from interface jadex.commons.meta.ITypedPropertyObjectgetMetaData, getMetaDatas
 
- 
 
- 
- 
- 
Field Detail- 
idprotected java.lang.Object id The object's ID.
 - 
typenameprotected java.lang.String typename The object's typename.
 - 
tasksprotected java.util.Map tasks The object's tasks.
 - 
tasklistenersprotected MultiCollection<java.lang.Object,IResultListener<?>> tasklisteners The task listeners.
 - 
fetcherprotected SimpleValueFetcher fetcher The fetcher.
 - 
spaceprotected AbstractEnvironmentSpace space The space.
 
- 
 - 
Constructor Detail- 
SpaceObjectpublic SpaceObject(java.lang.Object id, MObjectType type, java.util.Map properties, java.util.List tasks, java.lang.Object monitor, AbstractEnvironmentSpace space)Creates a new EnvironmentObject.- Parameters:
- objectId- the object's ID
- typename- the object's type
- properties- initial properties (may be null)
- propertiesMeta- the meta data of the properties
- tasks- initial task list (may be null)
 
 
- 
 - 
Method Detail- 
getPropertypublic java.lang.Object getProperty(java.lang.String name) Returns a property.- Specified by:
- getPropertyin interface- IPropertyObject
- Overrides:
- getPropertyin class- SynchronizedPropertyObject
- Parameters:
- name- name of the property
- Returns:
- the property
 
 - 
setPropertypublic void setProperty(java.lang.String name, java.lang.Object value)Only for debugging.- Specified by:
- setPropertyin interface- IPropertyObject
- Overrides:
- setPropertyin class- SynchronizedPropertyObject
- Parameters:
- name- name of the property
- value- value of the property
 
 - 
getIdpublic java.lang.Object getId() Get the objects id.- Specified by:
- getIdin interface- ISpaceObject
- Returns:
- The object id.
 
 - 
setIdpublic void setId(java.lang.Object id) Set the id of the object.
 - 
getTypepublic java.lang.String getType() Returns the type of the object.- Specified by:
- getTypein interface- ISpaceObject
- Returns:
- the type
 
 - 
setTypepublic void setType(java.lang.String type) Set the type of the object.
 - 
addTaskpublic void addTask(IObjectTask task) Adds a new task for the object.- Parameters:
- task- new task
 
 - 
removeTaskpublic void removeTask(java.lang.Object taskid, java.lang.Exception e)Removes a task from the object.- Parameters:
- task- The task.
 
 - 
getTaskspublic java.util.Collection getTasks() Returns all tasks of the object for introspection.- Returns:
- all tasks of the object
 
 - 
getTaskpublic IObjectTask getTask(java.lang.Object id) Get a specific task.- Parameters:
- id- The task id.
- Returns:
- The task.
 
 - 
clearTaskspublic void clearTasks() Removes all tasks from the object.
 - 
addTaskListenerpublic void addTaskListener(java.lang.Object taskid, IResultListener listener)Add a result listener to a task. The result will be the task id. If the task is already finished, the listener will be notified.
 - 
removeTaskListenerpublic void removeTaskListener(java.lang.Object taskid, IResultListener listener)Remove a result listener from a task.
 - 
updateObjectpublic void updateObject(IEnvironmentSpace space, long progress, IClockService clock) Updates the object to the current time. time the current time- Parameters:
- progress- The time that has passed according to the environment executor.
- clock- The clock service.
 
 - 
getPropertiespublic java.util.Map getProperties() Bean accessor. For serializing a space object, replace dynamic expressions with current values.- Overrides:
- getPropertiesin class- SimplePropertyObject
 
 - 
hasPropertypublic boolean hasProperty(java.lang.String name) Test if has a property.- Specified by:
- hasPropertyin interface- IPropertyObject
- Overrides:
- hasPropertyin class- SynchronizedPropertyObject
- Parameters:
- name- the name of the property to test
- Returns:
- trueif and only if the property exists
 
 - 
toStringpublic java.lang.String toString() Get the string representation.- Overrides:
- toStringin class- SimplePropertyObject
- Returns:
- The string representation.
 
 
- 
 
-