org.jboss.soa.esb.actions.persistence
Class StoreMessage

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.persistence.StoreMessage
All Implemented Interfaces:
ActionLifecycle, ActionPipelineProcessor, BeanConfiguredAction

public class StoreMessage
extends AbstractActionPipelineProcessor
implements BeanConfiguredAction

Action that stores the incoming message to a message store. The messageStoreType property indicates which message store to use. If not specified, the default message store is used. If the property value is 'database' or 'jcr', the indicated message store is used. Alternatively, the URI for any other message store type can be passed as the value.

Author:
Derek Adams

Field Summary
static java.lang.String INDICATOR_DATABASE
          Constant that indicates the database datastore should be used
static java.lang.String INDICATOR_JCR
          Constant that indicates the JCR datastore should be used
static java.lang.String MESSAGE_STORE_TYPE
          Property that indicates the type of message store to be queried
protected  java.lang.String messageStoreType
          Message store type indicator injected from bean config
protected  java.net.URI messageStoreTypeURI
          URI that indicates message store type
 
Fields inherited from interface org.jboss.soa.esb.actions.ActionPipelineProcessor
PROCESS_EXCEPTION_METHOD, PROCESS_METHOD, PROCESS_SUCCESS_METHOD
 
Constructor Summary
StoreMessage()
           
 
Method Summary
protected  java.net.URI getMessageStoreTypeURI()
          Attempts to load the URI for the message store type from the config tree.
 Message process(Message message)
          Perform the action processing on the specified message.
 void setMessageStoreType(java.lang.String messageStoreType)
          Message store type injected from bean configuartion.
 
Methods inherited from class org.jboss.soa.esb.actions.AbstractActionPipelineProcessor
processException, processSuccess
 
Methods inherited from class org.jboss.soa.esb.actions.AbstractActionLifecycle
destroy, initialise
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.soa.esb.actions.ActionLifecycle
destroy, initialise
 

Field Detail

MESSAGE_STORE_TYPE

public static final java.lang.String MESSAGE_STORE_TYPE
Property that indicates the type of message store to be queried

See Also:
Constant Field Values

INDICATOR_DATABASE

public static final java.lang.String INDICATOR_DATABASE
Constant that indicates the database datastore should be used

See Also:
Constant Field Values

INDICATOR_JCR

public static final java.lang.String INDICATOR_JCR
Constant that indicates the JCR datastore should be used

See Also:
Constant Field Values

messageStoreType

protected java.lang.String messageStoreType
Message store type indicator injected from bean config


messageStoreTypeURI

protected java.net.URI messageStoreTypeURI
URI that indicates message store type

Constructor Detail

StoreMessage

public StoreMessage()
Method Detail

setMessageStoreType

public void setMessageStoreType(java.lang.String messageStoreType)
Message store type injected from bean configuartion.

Parameters:
messageStoreType -

getMessageStoreTypeURI

protected java.net.URI getMessageStoreTypeURI()
                                       throws ActionProcessingException
Attempts to load the URI for the message store type from the config tree.

Returns:
Throws:
ActionProcessingException

process

public Message process(Message message)
                throws ActionProcessingException
Description copied from interface: ActionPipelineProcessor
Perform the action processing on the specified message. This method is invoked for each message passing throught the pipeline.

Specified by:
process in interface ActionPipelineProcessor
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.