|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.datamanager.tools.kernelproxy.KernelProxy
KernelProxy serves as a wrapper around the functionality of the kernel.
Thread
,
Entity
,
EventConstraint
Field Summary | |
static String |
IGNORED_ENTITY
Entities with this Attribute can be ignored by Interface. |
Method Summary | |
void |
addEntity(Entity entity)
Adds an entity to the pool. |
void |
addEvent(DataManagerEvent event)
Add a DataManagerEvent to the pool. |
void |
attachEntity(Entity base,
Entity attribute)
Attaches an Entity as an attribute to another Entity. |
Entity |
createAttribute(String name)
Creates a new Entity with an attached entity specifying that it is to be ignored by the interface. |
Entity |
createEntity(String name)
Creates a new Entity with the specified name. |
void |
detachEntity(Entity base,
Entity attribute)
Detaches an Entity as an attribute from another Entity. |
Entity[] |
getAttributes(Entity entity,
EntityConstraint constraint)
Retrieve all the attributes of an entity that match the given constraint. |
Entity[] |
getBases(Entity entity,
EntityConstraint constraint)
Retrieve all the bases of an entity that match the given constraint. |
String |
getEntityName(Entity entity)
Searches for all Entities that match the given constraint. |
EntityValue |
getEntityValue(Entity entity)
Sets the specified entity's value to the specified value. |
EventGenerator |
getEventGenerator()
Gets an EventGenerator from the Pool. |
EntityConstraint |
getIgnoredByInterfaceConstraint()
Gets the constraint for entities that are to ignored. |
static KernelProxy |
getInstance()
Gets the instance of the singleton KernelProxy. |
void |
removeEntity(Entity entity)
Removes an entity from the pool. |
void |
setEntityValue(Entity entity,
EntityValue value)
Sets the specified entity's value to the specified value. |
void |
subscribeToEvent(Class event,
EventHandler handler)
Subscribe handler to the event whose Class is class. |
void |
subscribeToEvent(EventConstraint constraint,
EventHandler handler)
Subscribe handler to the event described by the constraint. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String IGNORED_ENTITY
Method Detail |
public static KernelProxy getInstance()
public void addEntity(Entity entity)
entity
- the entity to add.public void removeEntity(Entity entity)
entity
- the entity to remove.public String getEntityName(Entity entity)
public void attachEntity(Entity base, Entity attribute)
base
- the base Entity to which the attribute will be attachedattribute
- the attribute to attachpublic void detachEntity(Entity base, Entity attribute)
base
- the base Entity to which the attribute will be detachedattribute
- the attribute to detachpublic Entity createEntity(String name)
name
- the name of the new Entity
public Entity createAttribute(String name)
name
- the name of the new Entity
public void setEntityValue(Entity entity, EntityValue value)
entity
- the entity whose value will be changedvalue
- the value to be addedpublic EntityValue getEntityValue(Entity entity)
entity
- the entity whose value will be changedpublic Entity[] getBases(Entity entity, EntityConstraint constraint)
entity
- the entity to find the bases ofconstraint
- the constraint that the bases much match
public Entity[] getAttributes(Entity entity, EntityConstraint constraint)
entity
- the entity to find the attributes ofconstraint
- the constraint that the attributes much match
public void addEvent(DataManagerEvent event)
event
- the event to add to the poolpublic void subscribeToEvent(EventConstraint constraint, EventHandler handler)
constraint
- the constraint describing the eventhandler
- the EventHandler to be called when an event happenspublic void subscribeToEvent(Class event, EventHandler handler)
event
- the Class class of the Event to be subscribe to.handler
- the EventHandler to be called when an event happenspublic EntityConstraint getIgnoredByInterfaceConstraint()
public EventGenerator getEventGenerator() throws DataManagerException
DataManagerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |