|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.sensorevent.engine.baseagent.AbstractTaskAgent
public abstract class AbstractTaskAgent
AbstractTaskAgent contains the processing common to all Premises Server task agent message-driven beans and Reusable Components
The interface associated with this class is ITaskAgent
.
Field Summary | |
---|---|
protected java.lang.String |
agentclassname
|
protected static java.lang.String |
AMITBUS
|
protected static java.lang.String |
AMITQ
|
protected static java.lang.String |
ANY
|
protected static java.lang.String |
COLON
|
static java.lang.String |
COPYRIGHT
|
protected static java.lang.String |
EVENT_PREFIX
|
protected static java.lang.String |
EVENT_PREFIX_SHORT
|
protected ISensorEvent |
ise
|
protected Message |
originalMsg
The original JMS message passed to the MDB's onMessage method |
protected static java.lang.String |
OUTBOUND
|
protected static java.util.HashMap |
registeredTopics
|
protected static java.lang.String |
SLASH
|
Constructor Summary | |
---|---|
AbstractTaskAgent()
|
Method Summary | |
---|---|
protected java.util.HashMap<java.lang.String,java.lang.String> |
addHeader(java.util.HashMap<java.lang.String,java.lang.String> props,
ISensorEvent ise)
|
void |
broadCast(ISensorEvent ibmse)
Publishes the event to the topic generated from the event's sourceId and eventType |
void |
broadCast(java.lang.String topic,
ISensorEvent ibmse)
Publishes the event to the topic |
protected java.lang.String |
getAgentname()
Get the current agentname |
protected java.lang.String |
getAgentProperty(java.lang.String propname,
java.lang.String defaultValue)
Get a specific property for this agent. |
protected java.util.Map |
getAgentStore()
This method will get the cache map for the current agent running associated with the current location (sourceid). |
protected java.util.Map |
getAgentStoreForGroup()
This method will get the cache map for the current agent running associated with the current profileid (Configuration Group). |
protected java.util.Map |
getAgentStoreForSystem()
This method will get the global cache map for the current agent. |
protected java.util.Map |
getAllAgentProperties()
Get all the properties for this agent in the current configuration group |
protected IConverter |
getEventConverter()
Returns an instance of the IConverter class defined in premises.properties |
protected java.lang.Object |
getJNDIObject(java.lang.String JNDIName)
This is just an object store for retreived JNDI objects |
protected java.lang.String |
getMsgProperty(java.lang.String propname)
Returns the string message property value from the original JMS message |
Message |
getOriginalMsg()
Returns the original JSM message |
protected PremisesContext |
getPremisesContext()
Get a read-only copy of all the context data for an agent. |
protected java.lang.String |
getPremisesHome()
This method will return the Premises home directory as defined by the JVM property "premisis.home.directory" |
protected java.lang.String |
getProfileid()
Get the current profileid |
protected java.lang.String |
getSourceid()
Get the source ID. |
protected java.util.Map |
getSystemProperties()
Get all of the properties associationed with the SystemAgent |
protected java.lang.String |
getValidId(java.lang.String id)
|
protected java.lang.String |
getXML(ISensorEvent ise)
Returns the ISensorEvent converted to XML |
protected boolean |
isIBMSE(java.util.Map map)
|
protected boolean |
isIBMSE(java.lang.String xml)
|
protected boolean |
isWBEPacket(java.lang.String xml)
|
protected void |
log(java.lang.String tracemsg)
Log a message to the WAS logger |
void |
publish(java.lang.String topic,
java.io.Serializable obj,
java.util.Map properties)
Publishes the serializable object with data properties to the topic |
void |
publish(java.lang.String topic,
java.lang.String message)
Publishes the string with data properties to the topic |
void |
publish(java.lang.String topic,
java.lang.String message,
java.util.Map properties)
Publishes the string with data properties to the topic |
void |
publishOutbound(ISensorEvent ibmse)
Takes the IBM Sensor event then converts it into XML then publishes the XML to the Premises Server output channel framework. |
void |
publishOutbound(java.lang.String topic,
java.lang.String message)
Publishes the message to the Premises Server output channels by matching the Premises Server event templates for the topic |
void |
publishOutbound(java.lang.String topic,
java.lang.String message,
java.util.HashMap<java.lang.String,java.lang.String> props)
Publishes the String message to the Premises Server output channel framework by matching the Premises Server event templates with the topic. |
void |
publishToCEP(java.lang.String eventname,
java.util.Map<java.lang.String,java.lang.Object> eventmap)
Publishes to complex event processing engine |
protected void |
resetAgentStore()
This method will invalidate the agentstore cache for this agent for the location(sourceid) level; If the ibmse/PremisesMaps cache object is configured for disk offload, this will also invalidate the agentstore on the disk. |
protected void |
resetAgentStoreForGroup()
This method will invalidate the agentstore for this agent at the profileid (configuration group) level; If the ibmse/PremisesMaps cache object is configured for disk offload, this will also invalidate the agentstore on the disk. |
protected void |
resetAgentStoreForSystem()
This method will invalidate the agentstore cache for this agent system wide; If the ibmse/PremisesMaps cache object is configured for disk offload, this will also invalidate the agentstore on the disk. |
protected void |
setAgentname(java.lang.String agentname)
Set the current agentname |
void |
setOriginalMsg(Message originalMsg)
Sets the original JMS message |
protected void |
setProfileid(java.lang.String profileid)
|
protected void |
setSourceid(java.lang.String sourceid)
|
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 static java.util.HashMap registeredTopics
protected static final java.lang.String OUTBOUND
protected static final java.lang.String EVENT_PREFIX
protected static final java.lang.String EVENT_PREFIX_SHORT
protected static final java.lang.String SLASH
protected static final java.lang.String ANY
protected static final java.lang.String COLON
protected static final java.lang.String AMITBUS
protected static final java.lang.String AMITQ
protected ISensorEvent ise
protected Message originalMsg
protected java.lang.String agentclassname
Constructor Detail |
---|
public AbstractTaskAgent()
Method Detail |
---|
public void publish(java.lang.String topic, java.lang.String message)
topic
- topic to publish tomessage
- string to publishproperties
- data properties to include when publishingpublic void publish(java.lang.String topic, java.lang.String message, java.util.Map properties)
publish
in interface ITaskAgent
topic
- topic to publish tomessage
- string to publishproperties
- data properties to include when publishingpublic void publish(java.lang.String topic, java.io.Serializable obj, java.util.Map properties)
publish
in interface ITaskAgent
topic
- topic to publish toobj
- serializable object to publishproperties
- data properties to include when publishingpublic void broadCast(java.lang.String topic, ISensorEvent ibmse)
broadCast
in interface ITaskAgent
topic
- topic to publish toibmse
- event to publishpublic void broadCast(ISensorEvent ibmse)
broadCast
in interface ITaskAgent
ibmse
- public void publishToCEP(java.lang.String eventname, java.util.Map<java.lang.String,java.lang.Object> eventmap)
publishToCEP
in interface ITaskAgent
eventname
- event nameeventmap
- datapublic void publishOutbound(ISensorEvent ibmse)
publishOutbound
in interface ITaskAgent
ibmse
- The IBMSensorEvent to publishpublic void publishOutbound(java.lang.String topic, java.lang.String message, java.util.HashMap<java.lang.String,java.lang.String> props)
topic
- what topic to publish onmessage
- the message to publishprops
- any properties that should be associated with this messagepublic void publishOutbound(java.lang.String topic, java.lang.String message)
topic
- what topic to publish onmessage
- the message to publishprotected java.lang.String getMsgProperty(java.lang.String propname) throws JMSException
propname
- message property name
JMSException
protected java.lang.String getXML(ISensorEvent ise)
ise
- the event to convertpublic Message getOriginalMsg()
public void setOriginalMsg(Message originalMsg)
originalMsg
- the messageprotected boolean isIBMSE(java.lang.String xml)
protected boolean isIBMSE(java.util.Map map)
protected boolean isWBEPacket(java.lang.String xml)
protected IConverter getEventConverter()
protected java.util.HashMap<java.lang.String,java.lang.String> addHeader(java.util.HashMap<java.lang.String,java.lang.String> props, ISensorEvent ise)
protected java.lang.String getValidId(java.lang.String id) throws java.lang.Exception
java.lang.Exception
protected PremisesContext getPremisesContext()
protected java.util.Map getSystemProperties() throws javax.naming.NamingException
javax.naming.NamingException
protected java.util.Map getAllAgentProperties() throws javax.naming.NamingException
javax.naming.NamingException
protected java.lang.String getAgentProperty(java.lang.String propname, java.lang.String defaultValue) throws javax.naming.NamingException
propname
- property name whose value is neededdefaultValue
- value that is returned if the property value is null
javax.naming.NamingException
protected java.lang.String getPremisesHome() throws java.lang.Exception
java.lang.Exception
protected java.util.Map getAgentStore() throws javax.naming.NamingException
javax.naming.NamingException
protected java.util.Map getAgentStoreForGroup() throws javax.naming.NamingException
javax.naming.NamingException
protected java.util.Map getAgentStoreForSystem() throws javax.naming.NamingException
javax.naming.NamingException
protected void resetAgentStore() throws javax.naming.NamingException
javax.naming.NamingException
protected void resetAgentStoreForGroup() throws javax.naming.NamingException
javax.naming.NamingException
protected void resetAgentStoreForSystem() throws javax.naming.NamingException
javax.naming.NamingException
protected java.lang.Object getJNDIObject(java.lang.String JNDIName) throws javax.naming.NamingException
JNDIName
- String JNDI object name
javax.naming.NamingException
protected void log(java.lang.String tracemsg)
tracemsg
- String message to logged.protected java.lang.String getAgentname()
protected void setAgentname(java.lang.String agentname)
agentname
- String current agentnameprotected java.lang.String getSourceid()
protected java.lang.String getProfileid()
protected void setSourceid(java.lang.String sourceid)
protected void setProfileid(java.lang.String profileid)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |