|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.sensorevent.engine.baseagent.AbstractTaskAgent
com.ibm.premises.reusable.AbstractRUCAgent
public abstract class AbstractRUCAgent
Parent class of all ReusableComponent Agent classes. The RUC Agent is where the logic for the RUC should be put. RUCs should define methods for all necessary logic.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
protected static java.lang.String |
EJBREF_DBBACKEND
|
protected static java.lang.String |
EJBREF_EPCISBACKEND
|
protected static java.lang.String |
EJBREF_PREMBACKEND
|
protected static java.lang.String |
EJBREF_RFIDICBACKEND
|
protected Utils |
utils
|
Fields inherited from class com.ibm.sensorevent.engine.baseagent.AbstractTaskAgent |
---|
agentclassname, AMITBUS, AMITQ, ANY, COLON, EVENT_PREFIX, EVENT_PREFIX_SHORT, ise, originalMsg, OUTBOUND, registeredTopics, SLASH |
Constructor Summary | |
---|---|
protected |
AbstractRUCAgent(java.lang.String agentName)
|
Method Summary | |
---|---|
protected java.lang.String |
getAgentProp(java.lang.String id)
|
static java.util.List<java.lang.String> |
getAllEPCsFromPayload(ISensorEvent event)
For a TagRead or AggregatedTagRead payload, get the tags from the payload For generic map payloads, find tagList keys defined in constants and return its value. |
static java.lang.String |
getEndpointFromProperties(java.util.Map systemProperties,
java.util.Map agentProperties,
java.lang.String endpointKey,
java.lang.String hostKey,
java.lang.String portKey,
java.lang.String extensionKey,
java.lang.String defaultHost,
java.lang.String defaultPort,
java.lang.String defaultExtension)
Looks in properties to determine the EPCIS Web Service endpoint First, looks in Agent properties, first looking for complete endpoint then either host/port/extension Then, performs same check in System properties After this, populate the rest of the endpoint |
static int |
getIntValueFromProperties(java.util.Map systemProperties,
java.util.Map agentProperties,
java.lang.String key,
int defaultValue)
|
protected java.util.HashMap<java.lang.String,java.lang.String> |
getJMSHeaderProperties(IPayloadMetaData pMD,
java.lang.String locationId)
Read JMS header properties (given by a specific jmsheader prefix in the key) from event metadata Always looks for JMS header properties in the payload metadata Only looks for JMS header properties in the location metadata if include.location.context is true |
protected java.util.HashMap<java.lang.String,java.lang.String> |
getJMSHeaderProperties(ISensorEvent ise)
Read JMS header properties (given by a specific jmsheader prefix in the key) from event metadata Always looks for JMS header properties in the payload metadata Only looks for JMS header properties in the location metadata if include.location.context is true. |
static long |
getLongValueFromProperties(java.util.Map systemProperties,
java.util.Map agentProperties,
java.lang.String key,
long defaultValue)
|
static java.lang.String |
getSingleEPCFromPayload(ISensorEvent event)
For a TagRead payload, get the tag from the payload For an AggregatedTagRead payload, get only the first tag For generic map payloads, find the tag key defined in constants and return its value. |
protected AggregationBackendInterface |
getTargetAggregationBackend()
|
protected AggregationInferenceBackendInterface |
getTargetAggregationInferenceBackend()
|
protected AssetMgmtBackendInterface |
getTargetAssetMgmtBackend()
|
protected AssetTypeMgmtBackendInterface |
getTargetAssetTypeMgmtBackend()
|
protected EJBObject |
getTargetBackendBean()
The real work-horse in getting backend beans, including custom beans by JNDI name and reflection |
protected CommissioningBackendInterface |
getTargetCommissioningBackend()
|
protected EPCDetailedQueryBackendInterface |
getTargetEPCDetailedQueryBackend()
|
protected EPCMgmtBackendInterface |
getTargetEPCMgmtBackend()
|
protected EPCPrintBackendInterface |
getTargetEPCPrintBackend()
|
protected MasterDataBackendInterface |
getTargetMasterDataBackend()
|
protected ObservationBackendInterface |
getTargetObservationBackend()
|
protected PedigreeBackendInterface |
getTargetPedigreeBackend()
|
protected java.lang.String |
getValueFromAgentOrSystemProperties(java.lang.String key,
java.lang.String defaultValue)
|
static java.lang.String |
getValueFromProperties(java.util.Map systemProperties,
java.util.Map agentProperties,
java.lang.String key,
java.lang.String defaultValue)
|
protected void |
publishEvent(java.lang.String eventType,
java.lang.String topic,
ISensorEvent event)
|
void |
publishFailureReply(java.util.Map map,
java.lang.String rucActionName,
java.lang.String origEventId)
Publish response message to SIBus to reply to RUC signal/query Should be called by each RUC MDB to push results asynchronously This allows for async chaining among RUCs |
protected void |
publishOutboundUsingTopicFromProps(java.lang.String messageXML,
IPayloadMetaData pMD,
java.lang.String locationId)
|
protected void |
publishOutboundUsingTopicFromProps(java.lang.String messageXML,
ISensorEvent ise)
|
void |
publishSuccessReply(java.util.Map map,
java.lang.String rucActionName,
java.lang.String origEventId)
Publish response message to SIBus to reply to RUC signal/query Should be called by each RUC MDB to push results asynchronously This allows for async chaining among RUCs |
Methods inherited from class com.ibm.sensorevent.engine.baseagent.AbstractTaskAgent |
---|
addHeader, broadCast, broadCast, getAgentname, getAgentProperty, getAgentStore, getAgentStoreForGroup, getAgentStoreForSystem, getAllAgentProperties, getEventConverter, getJNDIObject, getMsgProperty, getOriginalMsg, getPremisesContext, getPremisesHome, getProfileid, getSourceid, getSystemProperties, getValidId, getXML, isIBMSE, isIBMSE, isWBEPacket, log, publish, publish, publish, publishOutbound, publishOutbound, publishOutbound, publishToCEP, resetAgentStore, resetAgentStoreForGroup, resetAgentStoreForSystem, setAgentname, setOriginalMsg, setProfileid, setSourceid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
protected Utils utils
protected static final java.lang.String EJBREF_DBBACKEND
protected static final java.lang.String EJBREF_EPCISBACKEND
protected static final java.lang.String EJBREF_RFIDICBACKEND
protected static final java.lang.String EJBREF_PREMBACKEND
Constructor Detail |
---|
protected AbstractRUCAgent(java.lang.String agentName)
Method Detail |
---|
protected void publishEvent(java.lang.String eventType, java.lang.String topic, ISensorEvent event)
public void publishSuccessReply(java.util.Map map, java.lang.String rucActionName, java.lang.String origEventId)
map
- The map of payload attributes. If null, payload will have no attributes.rucActionName
- Used to query the Task Agent props for the public void publishFailureReply(java.util.Map map, java.lang.String rucActionName, java.lang.String origEventId)
map
- The map of payload attributes. If null, payload will have no attributes.rucActionName
- Used to query the Task Agent props for the protected void publishOutboundUsingTopicFromProps(java.lang.String messageXML, ISensorEvent ise)
protected void publishOutboundUsingTopicFromProps(java.lang.String messageXML, IPayloadMetaData pMD, java.lang.String locationId)
protected java.util.HashMap<java.lang.String,java.lang.String> getJMSHeaderProperties(ISensorEvent ise)
ise
-
protected java.util.HashMap<java.lang.String,java.lang.String> getJMSHeaderProperties(IPayloadMetaData pMD, java.lang.String locationId)
pMD
- locationId
-
protected java.lang.String getAgentProp(java.lang.String id)
protected AggregationBackendInterface getTargetAggregationBackend() throws ReusableComponentException
ReusableComponentException
protected AggregationInferenceBackendInterface getTargetAggregationInferenceBackend() throws ReusableComponentException
ReusableComponentException
protected CommissioningBackendInterface getTargetCommissioningBackend() throws ReusableComponentException
ReusableComponentException
protected EPCMgmtBackendInterface getTargetEPCMgmtBackend() throws ReusableComponentException
ReusableComponentException
protected EPCPrintBackendInterface getTargetEPCPrintBackend() throws ReusableComponentException
ReusableComponentException
protected EPCDetailedQueryBackendInterface getTargetEPCDetailedQueryBackend() throws ReusableComponentException
ReusableComponentException
protected MasterDataBackendInterface getTargetMasterDataBackend() throws ReusableComponentException
ReusableComponentException
protected ObservationBackendInterface getTargetObservationBackend() throws ReusableComponentException
ReusableComponentException
protected AssetMgmtBackendInterface getTargetAssetMgmtBackend() throws ReusableComponentException
ReusableComponentException
protected AssetTypeMgmtBackendInterface getTargetAssetTypeMgmtBackend() throws ReusableComponentException
ReusableComponentException
protected PedigreeBackendInterface getTargetPedigreeBackend() throws ReusableComponentException
ReusableComponentException
protected EJBObject getTargetBackendBean() throws ReusableComponentException
ReusableComponentException
- Based on ResourceLocator throwing NamingException during lookup, or a custom RUC exceptionprotected java.lang.String getValueFromAgentOrSystemProperties(java.lang.String key, java.lang.String defaultValue)
public static java.lang.String getValueFromProperties(java.util.Map systemProperties, java.util.Map agentProperties, java.lang.String key, java.lang.String defaultValue)
public static long getLongValueFromProperties(java.util.Map systemProperties, java.util.Map agentProperties, java.lang.String key, long defaultValue)
public static int getIntValueFromProperties(java.util.Map systemProperties, java.util.Map agentProperties, java.lang.String key, int defaultValue)
public static java.lang.String getEndpointFromProperties(java.util.Map systemProperties, java.util.Map agentProperties, java.lang.String endpointKey, java.lang.String hostKey, java.lang.String portKey, java.lang.String extensionKey, java.lang.String defaultHost, java.lang.String defaultPort, java.lang.String defaultExtension)
public static java.util.List<java.lang.String> getAllEPCsFromPayload(ISensorEvent event) throws SensorEventException
event
-
SensorEventException
public static java.lang.String getSingleEPCFromPayload(ISensorEvent event) throws SensorEventException
event
-
SensorEventException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |