org.jboss.soa.esb.actions
Class PropertySetter

java.lang.Object
  extended by org.jboss.soa.esb.actions.AbstractActionLifecycle
      extended by org.jboss.soa.esb.actions.PropertySetter
All Implemented Interfaces:
ActionLifecycle

public class PropertySetter
extends AbstractActionLifecycle

This action adds all of its attributes to the message as properties. It was created to help pass in the name of the filename to use for StoreMessageToFile for continuous integration of quickstarts, but it has a more generalized purpose in that it allows anyone to set message properties quickly in the jboss-esb.xml.

An "Action Processor" performs a processing action on a message payload and returns the processing result.

Here is an example of how to use this within your jboss-esb.xml :

<action name="AddProperty" class="org.jboss.soa.esb.actions.PropertySetter">
   <property name="jbesbfilename" value="BPMOrchestration1Test.log"/>
</action>

This will insert a property "jbesbfilename" into the message with a value of "BPMOrchestration1Test.log". There are no checks here on property names, so be careful when setting properties for JMS that you only set ones with valid names.

Since:
Version 4.2.1
Author:
tcunning@redhat.com

Field Summary
protected  ConfigTree _config
           
 
Constructor Summary
PropertySetter(ConfigTree config)
           
 
Method Summary
 Message process(Message message)
          Adds attributes to the message as properties
 
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
 

Field Detail

_config

protected ConfigTree _config
Constructor Detail

PropertySetter

public PropertySetter(ConfigTree config)
Method Detail

process

public Message process(Message message)
                throws java.lang.Exception
Adds attributes to the message as properties

Parameters:
message - message
Returns:
message
Throws:
java.lang.Exception