org.commonreality.sensors.base
Interface IObjectCreator<K extends IObjectKey>

Type Parameters:
K -
All Known Implementing Classes:
AbstractObjectCreator

public interface IObjectCreator<K extends IObjectKey>

Coordinates with PerceptManager to create IObjectKeys and their associated ISensoryObjects (typically a IAfferentObject). Ultimately, this class will also be responsible for the removal of the percept.

Author:
harrison

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)
           
 K createKey(java.lang.Object object)
          create the key for this object
 org.commonreality.object.ISensoryObject createObject(K 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.
 boolean handles(java.lang.Object object)
          can this creator deal with this type of object
 void installed(PerceptManager manager)
           
 void uninstalled(PerceptManager manager)
           
 

Method Detail

handles

boolean handles(java.lang.Object object)
can this creator deal with this type of object


createObject

org.commonreality.object.ISensoryObject createObject(K 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

Parameters:
objectKey -
object -
sensor -
agent -
Returns:

createKey

K createKey(java.lang.Object object)
create the key for this object

Parameters:
object -
Returns:

canDelete

boolean canDelete(IObjectKey objectKey)
test to see if the object key can be destroyed, removing the percept entirely.

Parameters:
objectKey -
Returns:

deleteKey

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

Parameters:
objectKey -
Returns:
true if the key was deleted

installed

void installed(PerceptManager manager)

uninstalled

void uninstalled(PerceptManager manager)

configure

void configure(java.util.Map<java.lang.String,java.lang.String> options)