org.commonreality.sensors.base.impl
Class AbstractObjectCreator

java.lang.Object
  extended by org.commonreality.sensors.base.impl.AbstractObjectCreator
All Implemented Interfaces:
IObjectCreator<DefaultObjectKey>

public abstract class AbstractObjectCreator
extends java.lang.Object
implements IObjectCreator<DefaultObjectKey>


Constructor Summary
AbstractObjectCreator()
           
 
Method Summary
 boolean canDelete(IObjectKey objectKey)
          test to see if the object key can be destroyed, removing the percept entirely.
 void configure(java.util.Map<java.lang.String,java.lang.String> options)
           
 DefaultObjectKey createKey(java.lang.Object object)
          create the key for this object
 org.commonreality.object.ISensoryObject createObject(DefaultObjectKey objectKey, java.lang.Object object, org.commonreality.sensors.ISensor sensor, org.commonreality.object.IAgentObject agent)
          create the initial percept, which can later be refined by IObjectProcessors
 boolean deleteKey(IObjectKey objectKey)
          delete the key and disconnect any listeners.
 void installed(PerceptManager manager)
           
 void uninstalled(PerceptManager manager)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.commonreality.sensors.base.IObjectCreator
handles
 

Constructor Detail

AbstractObjectCreator

public AbstractObjectCreator()
Method Detail

configure

public void configure(java.util.Map<java.lang.String,java.lang.String> options)
Specified by:
configure in interface IObjectCreator<DefaultObjectKey>

createKey

public DefaultObjectKey createKey(java.lang.Object object)
Description copied from interface: IObjectCreator
create the key for this object

Specified by:
createKey in interface IObjectCreator<DefaultObjectKey>
Returns:

createObject

public org.commonreality.object.ISensoryObject createObject(DefaultObjectKey objectKey,
                                                            java.lang.Object object,
                                                            org.commonreality.sensors.ISensor sensor,
                                                            org.commonreality.object.IAgentObject agent)
Description copied from interface: IObjectCreator
create the initial percept, which can later be refined by IObjectProcessors

Specified by:
createObject in interface IObjectCreator<DefaultObjectKey>
Returns:

installed

public void installed(PerceptManager manager)
Specified by:
installed in interface IObjectCreator<DefaultObjectKey>

uninstalled

public void uninstalled(PerceptManager manager)
Specified by:
uninstalled in interface IObjectCreator<DefaultObjectKey>

canDelete

public boolean canDelete(IObjectKey objectKey)
Description copied from interface: IObjectCreator
test to see if the object key can be destroyed, removing the percept entirely.

Specified by:
canDelete in interface IObjectCreator<DefaultObjectKey>
Returns:

deleteKey

public boolean deleteKey(IObjectKey objectKey)
delete the key and disconnect any listeners. The actual notification and removal of the percept is handled by the base sensor

Specified by:
deleteKey in interface IObjectCreator<DefaultObjectKey>
Parameters:
objectKey -
Returns:
true if the key was deleted