public abstract class AbstractEnvironmentSpace extends SynchronizedPropertyObject implements IEnvironmentSpace
| Constructor and Description |
|---|
AbstractEnvironmentSpace()
Create an environment space
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAvatarMappings(AvatarMapping mapping)
Adds an avatar mapping.
|
void |
addDataConsumer(String name,
ITableDataConsumer consumer)
Add a new data consumer.
|
void |
addDataProvider(String name,
ITableDataProvider provider)
Add a new data provider.
|
void |
addDataView(String name,
IDataView view)
Adds a view to the space.
|
void |
addDataViewMapping(String objecttype,
Map view)
Add a mapping from object type to data view
|
void |
addEnvironmentListener(IEnvironmentListener listener)
Add an environment listener.
|
void |
addInitialAvatar(IComponentIdentifier ownerid,
String type,
Map props)
Initial settings for the avatar of a specific component.
|
void |
addObjectTaskType(String typename,
Class clazz,
List properties)
Add a object task type.
|
void |
addPerceptGenerator(Object id,
IPerceptGenerator gen)
Adds a percept generator.
|
void |
addPerceptProcessor(String componenttype,
Set percepttypes,
IPerceptProcessor proc)
Add a percept processor.
|
void |
addPerceptType(PerceptType percepttype)
Add a space percept type.
|
void |
addSpaceAction(String id,
ISpaceAction action)
Adds an space action.
|
void |
addSpaceObjectType(String typename,
IPropertyMetaDataSet mobjecttype)
Add a space type.
|
void |
addSpaceProcessType(String typename,
Class clazz,
List properties)
Add a space process type.
|
void |
addTaskListener(Object taskid,
Object objectid,
IResultListener listener)
Add a result listener to an object task.
|
void |
cancelSpaceAction(int id)
Cancel a queued space action.
|
void |
componentAdded(IComponentDescription owner)
Called when an component was added.
|
void |
componentRemoved(IComponentDescription desc)
Called when an component was removed.
|
Object |
createObjectTask(String typename,
Map properties,
Object objectid)
Creates an object task.
|
void |
createPercept(String typename,
Object data,
IComponentDescription comp,
ISpaceObject avatar)
Create a percept for the given component.
|
ISpaceObject |
createSpaceObject(String typename,
Map properties,
List tasks)
Creates an object in this space.
|
ISpaceObject |
createSpaceObjectZombie(String typename,
Map properties,
List tasks)
Creates a zombie object in this space.
|
void |
createSpaceProcess(String typename,
Map properties)
Creates a space process.
|
void |
destroySpaceObject(Object id)
Destroys an object in this space.
|
ISpaceObject |
getAvatar(IComponentDescription owner)
Get the avatar object.
|
ISpaceObject |
getAvatar(IComponentDescription owner,
String fullname)
Get the avatar object.
|
ISpaceObject[] |
getAvatars(IComponentDescription owner)
Get the avatar objects.
|
ClassLoader |
getClassLoader()
Get the class loader.
|
ComponentActionList |
getComponentActionList()
Get the list of scheduled component actions
|
IComponentDescription[] |
getComponents()
Get the avatar objects.
|
ITableDataConsumer |
getDataConsumer(String name)
Get a data consumer.
|
Collection |
getDataConsumers()
Get the data consumers.
|
ITableDataProvider |
getDataProvider(String name)
Get a data provider.
|
IDataView |
getDataView(String name)
Gets a specific view.
|
Map |
getDataViews()
Get all available dataviews in this space.
|
IExternalAccess |
getExternalAccess()
Get the context.
|
SimpleValueFetcher |
getFetcher()
Get the value fetcher.
|
IComponentDescription |
getOwner(Object id)
Get the owner of an object.
|
PerceptList |
getPerceptList()
Get the list of scheduled percepts.
|
PerceptType |
getPerceptType(String percepttype)
Get a space percept type.
|
Collection |
getProcesses()
Get the processes.
|
Object |
getProperty(String name)
Returns a property.
|
ISpaceAction |
getSpaceAction(String id)
Adds an space action.
|
ISpaceObject |
getSpaceObject(Object id)
Returns an object in this space.
|
ISpaceObject |
getSpaceObject0(Object id)
Returns an object in this space.
|
ISpaceObject[] |
getSpaceObjectsByType(String type)
Get all space object of a specific type.
|
Collection |
getSpaceObjectsCollection()
Get the space objects.
|
ISpaceProcess |
getSpaceProcess(Object id)
Returns a space process.
|
Set |
getSpaceProcessNames()
Returns then names of the space processes.
|
Collection |
getViews()
Get the views.
|
IFuture<Void> |
init()
Initialize the extension.
|
IFuture<Void> |
initSpace()
Create a space.
|
void |
initSpaceObject(ISpaceObject ret)
Creates an object in this space.
|
Object |
performSpaceAction(String id,
Map parameters)
Performs a space action.
|
int |
performSpaceAction(String id,
Map parameters,
IResultListener listener)
Schedules an space action.
|
void |
removeAvatarMappings(AvatarMapping mapping)
Remove an avatar mapping.
|
void |
removeDataView(String name)
Removes a view from the space.
|
void |
removeEnvironmentListener(IEnvironmentListener listener)
Remove an environment listener.
|
void |
removeObjectTask(Object taskid,
Object objectid)
Remove an object task.
|
void |
removeObjectTaskType(String typename)
Remove an object task type.
|
void |
removePerceptGenerator(Object id)
Remove a percept generator.
|
void |
removePerceptProcessor(String componenttype,
IPerceptProcessor proc)
remove a percept processor.
|
void |
removePerceptType(String typename)
Remove a space process type.
|
void |
removeSpaceAction(String id)
Removes an space action.
|
void |
removeSpaceObjectType(String typename)
Remove a space object type.
|
void |
removeSpaceProcess(Object id)
Removes a space process.
|
void |
removeSpaceProcessType(String typename)
Remove a space process type.
|
void |
removeTaskListener(Object taskid,
Object objectid,
IResultListener listener)
Remove a result listener from an object task.
|
void |
setFetcher(SimpleValueFetcher fetcher)
Set the fetcher.
|
void |
setInitData(IInternalAccess ia,
MEnvSpaceInstance config,
IValueFetcher pfetcher) |
void |
setOwner(Object id,
IComponentDescription owner)
Set the owner of an object.
|
IFuture<Void> |
terminate()
Terminate the extension.
|
IFuture<Void> |
waitForTask(Object taskid,
Object objectid)
Add a result listener to an object task.
|
addPropertyChangeListener, getMonitor, getPropertyNames, hasProperty, removePropertyChangeListener, setPropertygetMetaData, getMetaDatasgetProperties, setProperties, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPropertyNames, hasProperty, setPropertypublic AbstractEnvironmentSpace()
public void setInitData(IInternalAccess ia, MEnvSpaceInstance config, IValueFetcher pfetcher)
public void addSpaceObjectType(String typename, IPropertyMetaDataSet mobjecttype)
addSpaceObjectType in interface IEnvironmentSpacetypename - The type name.initproperties - The MobjectType.public void removeSpaceObjectType(String typename)
removeSpaceObjectType in interface IEnvironmentSpacetypename - The type name.public void addSpaceProcessType(String typename, Class clazz, List properties)
addSpaceProcessType in interface IEnvironmentSpacetypename - The type name.properties - The properties.public void removeSpaceProcessType(String typename)
removeSpaceProcessType in interface IEnvironmentSpacetypename - The type name.public void createSpaceProcess(String typename, Map properties)
createSpaceProcess in interface IEnvironmentSpacetypename - The type name.properties - The properties.public void addObjectTaskType(String typename, Class clazz, List properties)
addObjectTaskType in interface IEnvironmentSpacetypename - The type name.properties - The properties.public void removeObjectTaskType(String typename)
removeObjectTaskType in interface IEnvironmentSpacetypename - The type name.public Object createObjectTask(String typename, Map properties, Object objectid)
createObjectTask in interface IEnvironmentSpacetypename - The type name.properties - The properties.public void removeObjectTask(Object taskid, Object objectid)
removeObjectTask in interface IEnvironmentSpacetypename - The type name.initproperties - The properties.public void addTaskListener(Object taskid, Object objectid, IResultListener listener)
addTaskListener in interface IEnvironmentSpacepublic void removeTaskListener(Object taskid, Object objectid, IResultListener listener)
removeTaskListener in interface IEnvironmentSpacepublic IFuture<Void> waitForTask(Object taskid, Object objectid)
waitForTask in interface IEnvironmentSpacepublic Set getSpaceProcessNames()
public ISpaceProcess getSpaceProcess(Object id)
getSpaceProcess in interface IEnvironmentSpaceid - ID of the space processpublic void removeSpaceProcess(Object id)
removeSpaceProcess in interface IEnvironmentSpaceid - ID of the space processpublic final ISpaceObject createSpaceObject(String typename, Map properties, List tasks)
createSpaceObject in interface IEnvironmentSpacetype - the object's typeproperties - initial properties (may be null)tasks - initial task list (may be null)public ISpaceObject createSpaceObjectZombie(String typename, Map properties, List tasks)
type - the object's typeproperties - initial properties (may be null)tasks - initial task list (may be null)public void initSpaceObject(ISpaceObject ret)
type - the object's typeinitproperties - initial properties (may be null)tasks - initial task list (may be null)listeners - initial listeners (may be null)public void destroySpaceObject(Object id)
destroySpaceObject in interface IEnvironmentSpaceid - the object's IDpublic ISpaceObject getSpaceObject(Object id)
getSpaceObject in interface IEnvironmentSpaceid - the object's IDpublic ISpaceObject getSpaceObject0(Object id)
id - the object's IDpublic ISpaceObject[] getSpaceObjectsByType(String type)
getSpaceObjectsByType in interface IEnvironmentSpacetype - The space object type.public void addAvatarMappings(AvatarMapping mapping)
componenttype - The component type.objecttype - The object type to represent the component.public void removeAvatarMappings(AvatarMapping mapping)
componenttype - The component type.objecttype - The object type to represent the component.public void addSpaceAction(String id, ISpaceAction action)
addSpaceAction in interface IEnvironmentSpaceactionId - the action IDaction - the actionpublic ISpaceAction getSpaceAction(String id)
actionId - the action IDaction - the actionpublic void removeSpaceAction(String id)
removeSpaceAction in interface IEnvironmentSpaceactionId - the action IDpublic int performSpaceAction(String id, Map parameters, IResultListener listener)
performSpaceAction in interface IEnvironmentSpaceid - Id of the actionparameters - parameters for the action (may be null)listener - the result listenerpublic void cancelSpaceAction(int id)
cancelSpaceAction in interface IEnvironmentSpacepublic Object performSpaceAction(String id, Map parameters)
id - Id of the actionparameters - parameters for the action (may be null)public void createPercept(String typename, Object data, IComponentDescription comp, ISpaceObject avatar)
typename - The percept type.data - The content of the percept (if any).cid - The component that should receive the percept.public IComponentDescription getOwner(Object id)
id - The id.public void setOwner(Object id, IComponentDescription owner)
setOwner in interface IEnvironmentSpaceid - The object id.pos - The object owner.public ISpaceObject[] getAvatars(IComponentDescription owner)
getAvatars in interface IEnvironmentSpacepublic IComponentDescription[] getComponents()
public ISpaceObject getAvatar(IComponentDescription owner)
getAvatar in interface IEnvironmentSpacepublic ISpaceObject getAvatar(IComponentDescription owner, String fullname)
public void addDataView(String name, IDataView view)
addDataView in interface IEnvironmentSpacename - name of the viewview - the viewpublic void removeDataView(String name)
removeDataView in interface IEnvironmentSpacename - name of the viewpublic IDataView getDataView(String name)
getDataView in interface IEnvironmentSpacename - name of the viewpublic Map getDataViews()
getDataViews in interface IEnvironmentSpacepublic void addDataViewMapping(String objecttype, Map view)
objecttype - The object type.view - Settings for view creation.public void addEnvironmentListener(IEnvironmentListener listener)
addEnvironmentListener in interface IEnvironmentSpacelistener - The environment listener.public void removeEnvironmentListener(IEnvironmentListener listener)
removeEnvironmentListener in interface IEnvironmentSpacelistener - The environment listener.public void addPerceptGenerator(Object id, IPerceptGenerator gen)
addPerceptGenerator in interface IEnvironmentSpaceid - The percept generator id.gen - The percept generator.public void removePerceptGenerator(Object id)
removePerceptGenerator in interface IEnvironmentSpaceid - The percept generator id.public void addPerceptProcessor(String componenttype, Set percepttypes, IPerceptProcessor proc)
componenttype - The component type.proc - The percept processor.public void removePerceptProcessor(String componenttype, IPerceptProcessor proc)
componenttype - The component type.proc - The percept processor.public void addPerceptType(PerceptType percepttype)
addPerceptType in interface IEnvironmentSpacetypename - The percept name.objecttypes - The objecttypes.componenttypes - The componenttypes.public void removePerceptType(String typename)
removePerceptType in interface IEnvironmentSpacetypename - The type name.public PerceptType getPerceptType(String percepttype)
getPerceptType in interface IEnvironmentSpacepercepttype - The name of the percept type.public void componentAdded(IComponentDescription owner)
public void componentRemoved(IComponentDescription desc)
public IExternalAccess getExternalAccess()
getExternalAccess in interface IEnvironmentSpacepublic Object getProperty(String name)
getProperty in interface IPropertyObjectgetProperty in class SynchronizedPropertyObjectname - name of the propertypublic SimpleValueFetcher getFetcher()
public void setFetcher(SimpleValueFetcher fetcher)
fetcher - The fetcher to set.public Collection getSpaceObjectsCollection()
public Collection getProcesses()
public ComponentActionList getComponentActionList()
public PerceptList getPerceptList()
public Collection getViews()
public void addInitialAvatar(IComponentIdentifier ownerid, String type, Map props)
ownerid - The component id.type - The object type.props - The properties for the object (if any).public void addDataProvider(String name, ITableDataProvider provider)
name - The name.provider - The provider.public ITableDataProvider getDataProvider(String name)
name - The name.public void addDataConsumer(String name, ITableDataConsumer consumer)
consumer - The consumer.public ITableDataConsumer getDataConsumer(String name)
name - The name.public Collection getDataConsumers()
public IFuture<Void> init()
init in interface IExtensionInstancepublic IFuture<Void> terminate()
terminate in interface IExtensionInstancepublic ClassLoader getClassLoader()
Copyright © 2015. All Rights Reserved.