org.ikasan.framework.initiator.messagedriven
Class EventMessageDrivenInitiator

java.lang.Object
  extended by org.ikasan.framework.initiator.AbstractInitiator
      extended by org.ikasan.framework.initiator.messagedriven.JmsMessageDrivenInitiatorImpl
          extended by org.ikasan.framework.initiator.messagedriven.EventMessageDrivenInitiator
All Implemented Interfaces:
javax.jms.MessageListener, Initiator, JmsMessageDrivenInitiator, ListenerSetupFailureListener, MonitorSubject

public class EventMessageDrivenInitiator
extends JmsMessageDrivenInitiatorImpl

A JmsMessageDrivenInitiator implementation that seeks to recreate and fire an Events based on JMS messages. This implementation expects that the incoming message data represents a previously serialised (for JMS publication) Event. TODO the Event serialisation and deserialisation code needs to be tightly bound

Author:
Ikasan Development Team

Field Summary
 
Fields inherited from class org.ikasan.framework.initiator.messagedriven.JmsMessageDrivenInitiatorImpl
anesthetist, JMS_MESSAGE_DRIVEN_INITIATOR_TYPE, messageListenerContainer
 
Fields inherited from class org.ikasan.framework.initiator.AbstractInitiator
error, errorLoggingService, EXCEPTION_ACTION_IMPLIED_ROLLBACK, exceptionHandler, excludedEventService, exclusions, flow, moduleName, monitorListeners, name, retryCount, stopping, UNSUPPORTED_EXCLUDE_ENCONTERED
 
Constructor Summary
EventMessageDrivenInitiator(String moduleName, String name, Flow flow, IkasanExceptionHandler exceptionHandler, JmsMessageEventSerialiser<javax.jms.MapMessage> jmsMessageEventSerialiser)
          Constructor
 
Method Summary
protected  org.apache.log4j.Logger getLogger()
          Provides access to the implementation class specific logger instance
protected  Event handleMapMessage(javax.jms.MapMessage message)
          JMS Message specific type handling for MapMessage Subclasses that wish to support this Message type will override this
 
Methods inherited from class org.ikasan.framework.initiator.messagedriven.JmsMessageDrivenInitiatorImpl
anesthetistOperating, cancelRetryCycle, completeRetryCycle, continueRetryCycle, getMessageListenerContainer, getType, handleBytesMessage, handleObjectMessage, handleStreamMessage, handleTextMessage, isRecovering, isRunning, notifyListenerSetupFailure, onMessage, setListenerSetupFailureRetryDelay, setMaxListenerSetupFailureRetries, setMessageListenerContainer, startInitiator, startRetryCycle, stopInitiator
 
Methods inherited from class org.ikasan.framework.initiator.AbstractInitiator
addListener, getExceptionHandler, getExclusions, getFlow, getHandledEventCount, getLastEventTime, getModuleName, getMonitorListeners, getName, getRetryCount, getState, handleAction, handleRetry, invokeFlow, invokeFlow, isError, isStopping, logError, notifyMonitorListeners, removeListener, resume, setErrorLoggingService, setExcludedEventService, start, stop, stopInError, supportsExclusions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ikasan.framework.initiator.Initiator
getExceptionHandler, getFlow, getHandledEventCount, getLastEventTime, getName, getRetryCount, getState, isError, start, stop
 
Methods inherited from interface org.ikasan.framework.monitor.MonitorSubject
addListener, removeListener
 

Constructor Detail

EventMessageDrivenInitiator

public EventMessageDrivenInitiator(String moduleName,
                                   String name,
                                   Flow flow,
                                   IkasanExceptionHandler exceptionHandler,
                                   JmsMessageEventSerialiser<javax.jms.MapMessage> jmsMessageEventSerialiser)
Constructor

Parameters:
moduleName - - name of the module
name - - name of this initiator
flow - - flow to invoke
exceptionHandler - - handler for Exceptions
jmsMessageEventSerialiser - - The serialiser for the JMS message
Method Detail

handleMapMessage

protected Event handleMapMessage(javax.jms.MapMessage message)
                          throws javax.jms.JMSException,
                                 EventDeserialisationException
Description copied from class: JmsMessageDrivenInitiatorImpl
JMS Message specific type handling for MapMessage Subclasses that wish to support this Message type will override this

Overrides:
handleMapMessage in class JmsMessageDrivenInitiatorImpl
Parameters:
message - The message to handle
Returns:
Event
Throws:
javax.jms.JMSException - Exception if there is a problem with JMS
EventDeserialisationException

getLogger

protected org.apache.log4j.Logger getLogger()
Description copied from class: AbstractInitiator
Provides access to the implementation class specific logger instance

Specified by:
getLogger in class AbstractInitiator
Returns:
Logger instance for the extending class


Copyright © 2007-2012 Ikasan. All Rights Reserved.