public class SpaceObject extends SynchronizedPropertyObject implements ISpaceObject
PROPERTY_OWNER
Constructor and Description |
---|
SpaceObject()
Bean constructor.
|
SpaceObject(Object id,
MObjectType type,
Map properties,
List tasks,
Object monitor,
AbstractEnvironmentSpace space)
Creates a new EnvironmentObject.
|
Modifier and Type | Method and Description |
---|---|
void |
addTask(IObjectTask task)
Adds a new task for the object.
|
void |
addTaskListener(Object taskid,
IResultListener listener)
Add a result listener to a task.
|
void |
clearTasks()
Removes all tasks from the object.
|
Object |
getId()
Get the objects id.
|
Map |
getProperties()
Bean accessor.
|
Object |
getProperty(String name)
Returns a property.
|
IObjectTask |
getTask(Object id)
Get a specific task.
|
Collection |
getTasks()
Returns all tasks of the object for introspection.
|
String |
getType()
Returns the type of the object.
|
void |
removeTask(Object taskid,
Exception e)
Removes a task from the object.
|
void |
removeTaskListener(Object taskid,
IResultListener listener)
Remove a result listener from a task.
|
void |
setId(Object id)
Set the id of the object.
|
void |
setProperty(String name,
Object value)
Only for debugging.
|
void |
setType(String type)
Set the type of the object.
|
String |
toString()
Get the string representation.
|
void |
updateObject(IEnvironmentSpace space,
long progress,
IClockService clock)
Updates the object to the current time.
|
addPropertyChangeListener, getMonitor, getPropertyNames, hasProperty, removePropertyChangeListener
getMetaData, getMetaDatas
setProperties
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMetaData, getMetaDatas
getPropertyNames, hasProperty
public SpaceObject(Object id, MObjectType type, Map properties, List tasks, Object monitor, AbstractEnvironmentSpace space)
objectId
- the object's IDtypename
- the object's typeproperties
- initial properties (may be null)propertiesMeta
- the meta data of the propertiestasks
- initial task list (may be null)public SpaceObject()
public Object getProperty(String name)
getProperty
in interface IPropertyObject
getProperty
in class SynchronizedPropertyObject
name
- name of the propertypublic void setProperty(String name, Object value)
setProperty
in interface IPropertyObject
setProperty
in class SynchronizedPropertyObject
name
- name of the propertyvalue
- value of the propertypublic Object getId()
getId
in interface ISpaceObject
public void setId(Object id)
public String getType()
getType
in interface ISpaceObject
public void setType(String type)
public void addTask(IObjectTask task)
task
- new taskpublic void removeTask(Object taskid, Exception e)
task
- The task.public Collection getTasks()
public IObjectTask getTask(Object id)
id
- The task id.public void clearTasks()
public void addTaskListener(Object taskid, IResultListener listener)
public void removeTaskListener(Object taskid, IResultListener listener)
public void updateObject(IEnvironmentSpace space, long progress, IClockService clock)
progress
- The time that has passed according to the environment executor.clock
- The clock service.public Map getProperties()
getProperties
in class SimplePropertyObject
public String toString()
toString
in class SimplePropertyObject
Copyright © 2013. All Rights Reserved.