org.jboss.soa.esb.actions.routing
Class JMSRouter

java.lang.Object
  extended by org.jboss.soa.esb.actions.routing.JMSRouter
All Implemented Interfaces:
ActionProcessor

public class JMSRouter
extends java.lang.Object
implements ActionProcessor

JSM Routing Action Processor.

Sample Action Configuration:

 <Action name="Route-To-Invoicing" processor="JMSRouter">
     <property name="jndiName" value="queue/A" />
     <property name="message-prop:jms-selector" value="incoming-invoice" />
 </Action>
 
Note how properties to be set on the message are prefixed with "message-prop:".

TODO: Add support for JMS Topic destinations.

Since:
Version 4.0
Author:
tom.fennelly@jboss.com

Constructor Summary
JMSRouter(java.lang.String actionName, java.util.List<KeyValuePair> properties)
          Public constructor.
 
Method Summary
protected  void finalize()
           
 java.io.Serializable getErrorNotification(Message message)
          Get the "Error" notification message for this processor.
 java.io.Serializable getOkNotification(Message message)
          Get the "OK" notification message for this processor.
 Message process(Message message)
          Perform the processing action on the message
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSRouter

public JMSRouter(java.lang.String actionName,
                 java.util.List<KeyValuePair> properties)
          throws ConfigurationException,
                 javax.naming.NamingException,
                 javax.jms.JMSException
Public constructor.

Parameters:
actionName - Action name.
properties - Action properties.
Throws:
ConfigurationException - Queue name not configured.
javax.jms.JMSException - Unable to configure JMS destination.
javax.naming.NamingException - Unable to configure JMS destination.
Method Detail

process

public Message process(Message message)
                throws ActionProcessingException
Description copied from interface: ActionProcessor
Perform the processing action on the message

Specified by:
process in interface ActionProcessor
Parameters:
message - The message to be processed.
Returns:
Message - result of process
Throws:
ActionProcessingException - Exception during payload processing.

getOkNotification

public java.io.Serializable getOkNotification(Message message)
Description copied from interface: ActionProcessor
Get the "OK" notification message for this processor.

Specified by:
getOkNotification in interface ActionProcessor
Parameters:
message - The message Object.
Returns:
The OK message.

getErrorNotification

public java.io.Serializable getErrorNotification(Message message)
Description copied from interface: ActionProcessor
Get the "Error" notification message for this processor.

Specified by:
getErrorNotification in interface ActionProcessor
Parameters:
message - The message Object.
Returns:
The Error message.

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable