T - The type of the bound entity.public abstract class EntityAgent<T extends com.ibm.ia.model.Entity> extends Agent implements com.ibm.ia.agent.EntityAgentService<T>
The base class that is extended by agent implementations that are bound to an entity. This class extends the Agent class and provided support for working with the bound entity.
A typical EntityAgent implementation might use the following pattern to work with the bound entity:
For more information refer to Entity lifecycle documentation in the InfoCenter.
delayValue| Modifier and Type | Method and Description |
|---|---|
T |
createBoundEntity()
Creates an instance of the bound entity using the default entity type for the agent.
|
<C extends T> |
createBoundEntity(java.lang.Class<C> entityClass)
Creates an instance of the bound entity using the specified entity type.
|
T |
createBoundEntity(java.lang.String entityType)
Creates an instance of the bound entity using the specified entity type.
|
boolean |
deleteBoundEntity()
Delete the bound entity from the entity store.
|
T |
getBoundEntity()
Retrieves the bound entity from the entity store.
|
boolean |
updateBoundEntity(T entity)
Stores the bound entity in the entity store.
|
activated, agentPerformsSelfMonitoring, cancelSchedule, clearEngineTime, clearEventTTL, clearOutboundEvents, createRelationship, createRelationship, deactivated, emit, getAgentDescriptor, getAgentProperty, getAgentVersion, getCalendarDuration, getCurrentEventReference, getEmittedEvents, getEngineTime, getEntityFactory, getEventFactory, getEventTTL, getFactoryServices, getGenericEntity, getGlobalValue, getJobService, getModelFactory, getRequiredEngineVersion, getSolutionDescriptor, getSolutionProperties, getSolutionProperty, getSolutionProperty, getSpatialService, getTimeService, getTimeService, hasUserDefinedCookie, init, initializeEngineDefinition, isThrowableIgnored, loadRulesetArchive, printToLog, printToLog, printToLog, process, process, resolveEvent, schedule, schedule, setEngineTime, setEventTTL, setRequiredEngineVersion, toString, useMonitorWarningemit, getConceptFactory, getEventInstance, getEventResolver, getLocalQueryService, getModelSerializer, getObjectEntityResolver, getObjectEventResolver, getTimeService, processOutboundEvents, resetResolvers, setEntityResolver, setEntityScopedQS, setModelFactory, setObjectEntityResolver, setSolutionDescriptorpublic T getBoundEntity() throws AgentException, EntityTypeException
AgentExceptionEntityTypeExceptionpublic T createBoundEntity() throws AgentException
AgentExceptionpublic <C extends T> C createBoundEntity(java.lang.Class<C> entityClass) throws AgentException
AgentExceptionentityClass - The require entity type, which must be a subclass of the default
entity type for the agent.public T createBoundEntity(java.lang.String entityType) throws AgentException, EntityTypeException
AgentExceptionEntityTypeExceptionentityType - The require entity type, which must be a subclass of the default
entity type for the agent.public boolean deleteBoundEntity()
throws AgentException
AgentExceptionpublic boolean updateBoundEntity(T entity) throws AgentException, BoundEntityIDException
AgentExceptionBoundEntityIDExceptionentity - The new entity value.© Copyright IBM 2017