org.jboss.soa.esb.actions
Class MessagePersister

java.lang.Object
  extended by org.jboss.soa.esb.actions.AbstractActionLifecycle
      extended by org.jboss.soa.esb.actions.AbstractActionPipelineProcessor
          extended by org.jboss.soa.esb.actions.MessagePersister
All Implemented Interfaces:
ActionLifecycle, ActionPipelineProcessor

public class MessagePersister
extends AbstractActionPipelineProcessor


Field Summary
static java.lang.String CLASSIFICATION_ATTR
           
protected  ConfigTree config
           
static java.lang.String MESSAGE_STORE_TYPE_ATTR
           
protected  MessageStore messageStore
           
static java.lang.String SERVICE_CATEGORY
           
static java.lang.String SERVICE_NAME
           
 
Fields inherited from interface org.jboss.soa.esb.actions.ActionPipelineProcessor
PROCESS_EXCEPTION_METHOD, PROCESS_METHOD, PROCESS_SUCCESS_METHOD
 
Constructor Summary
MessagePersister(ConfigTree config)
           
 
Method Summary
 void destroy()
          Destroy the action instance.
 void initialise()
          Initialise the action instance.
 Message process(Message message)
          Persists the message to the MessageStore
 
Methods inherited from class org.jboss.soa.esb.actions.AbstractActionPipelineProcessor
processException, processSuccess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_CATEGORY

public static final java.lang.String SERVICE_CATEGORY
See Also:
Constant Field Values

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values

MESSAGE_STORE_TYPE_ATTR

public static final java.lang.String MESSAGE_STORE_TYPE_ATTR
See Also:
Constant Field Values

CLASSIFICATION_ATTR

public static final java.lang.String CLASSIFICATION_ATTR
See Also:
Constant Field Values

config

protected ConfigTree config

messageStore

protected MessageStore messageStore
Constructor Detail

MessagePersister

public MessagePersister(ConfigTree config)
                 throws ConfigurationException,
                        RegistryException,
                        MessageRouterException
Throws:
ConfigurationException
RegistryException
MessageRouterException
Method Detail

process

public Message process(Message message)
                throws ActionProcessingException
Persists the message to the MessageStore

Parameters:
message - The current message being processed.
Returns:
The message to be passed to the next stage of the pipeline.
Throws:
ActionProcessingException - for errors during processing.

initialise

public void initialise()
                throws ActionLifecycleException
Description copied from class: AbstractActionLifecycle
Initialise the action instance.

This method is called after the action instance has been instantiated so that configuration options can be validated.

Specified by:
initialise in interface ActionLifecycle
Overrides:
initialise in class AbstractActionLifecycle
Throws:
ActionLifecycleException - for errors during initialisation.

destroy

public void destroy()
             throws ActionLifecycleException
Description copied from class: AbstractActionLifecycle
Destroy the action instance.

This method is called prior to the release of the action instance. All resources associated with this action instance should be released as the instance will no longer be used.

Specified by:
destroy in interface ActionLifecycle
Overrides:
destroy in class AbstractActionLifecycle
Throws:
ActionLifecycleException