com.ibm.sensorevent.engine.baseagent
Class IBMSEAbstractTaskAgent

java.lang.Object
  extended by com.ibm.sensorevent.engine.baseagent.AbstractTaskAgent
      extended by com.ibm.sensorevent.engine.baseagent.IBMSEAbstractTaskAgent
All Implemented Interfaces:
ITaskAgent

public abstract class IBMSEAbstractTaskAgent
extends AbstractTaskAgent

IBMSEAbstractTaskAgent represents the common superclass of all Premises Server task agent message-driven beans.


Field Summary
static java.lang.String COPYRIGHT
           
 
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
IBMSEAbstractTaskAgent()
           
 
Method Summary
protected  java.lang.String getCompressedBodyAsString(BytesMessage message)
          getBodyAsString
protected  void onEvent(javax.jms.Message eventmsg)
          This method is called by the runtime when the taskagent or reusable component MDB has received a message that is not an IBMSensorEvent.
protected abstract  void onIBMSensorEvent(ISensorEvent ibmse)
          Message handler specific to processing sensor events; this method must be implemented in a subclass
protected  void onIBMSensorEvent(java.util.Map ibmse_map)
          ise value already contains the IBMSensoreEvent object
protected  void onIBMSensorEvent(java.lang.String ibmse_xml)
          ise value already contains the IBMSensoreEvent object
protected  void onMessage(Message message)
          Message handler for JMS messages; calls the method onIBMSensorEvent if the message is a sensor event or calls onEvent if the message is not an IBMSensorEvent
 
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

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

IBMSEAbstractTaskAgent

public IBMSEAbstractTaskAgent()
Method Detail

onIBMSensorEvent

protected abstract void onIBMSensorEvent(ISensorEvent ibmse)
Message handler specific to processing sensor events; this method must be implemented in a subclass

Parameters:
ibmse - the sensor event to process

onIBMSensorEvent

protected void onIBMSensorEvent(java.lang.String ibmse_xml)
ise value already contains the IBMSensoreEvent object

Parameters:
ibmse_xml -

onIBMSensorEvent

protected void onIBMSensorEvent(java.util.Map ibmse_map)
ise value already contains the IBMSensoreEvent object

Parameters:
ibmse_map -

onEvent

protected void onEvent(javax.jms.Message eventmsg)
This method is called by the runtime when the taskagent or reusable component MDB has received a message that is not an IBMSensorEvent. This method will send the JMS message to the 'dead message topic'; if this method is called during processing, then the message received cannot be processed by the taskagent or reuseable compononent. NOTE: If the AbstractTaskAgent or reusable component MDB is expectiong something other than an IBMSensorEvent then it should overide this method so that it can receive the event.

Parameters:
eventmsg - JMS message received from the SI-Bus

onMessage

protected void onMessage(Message message)
Message handler for JMS messages; calls the method onIBMSensorEvent if the message is a sensor event or calls onEvent if the message is not an IBMSensorEvent

Parameters:
message - the MMS message to process

getCompressedBodyAsString

protected java.lang.String getCompressedBodyAsString(BytesMessage message)
                                              throws java.lang.Exception
getBodyAsString

Throws:
java.lang.Exception


Copyright © 2005 - 2009 IBM Corp. All Rights Reserved.