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

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

public abstract class AbstractRouter
extends java.lang.Object
implements ActionProcessor

Abstract router.

Handles unwrapping of the message payload (if required) before routing. To turn on unwrapping, supply an "unwrap" property with a value of "true" (default "false").

Author:
tom.fennelly@jboss.com

Field Summary
 boolean unwrap
          Unwrap the message payload before routing.
 
Constructor Summary
AbstractRouter(java.lang.String actionName, java.util.List<KeyValuePair> properties)
          Public constructor.
 
Method Summary
 Message process(Message message)
          Perform the processing action on the message
abstract  void route(java.lang.Object object)
          Route the message or message payload.
 
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.ActionProcessor
getErrorNotification, getOkNotification
 

Field Detail

unwrap

public boolean unwrap
Unwrap the message payload before routing.

Constructor Detail

AbstractRouter

public AbstractRouter(java.lang.String actionName,
                      java.util.List<KeyValuePair> properties)
               throws ConfigurationException
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 final 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.

route

public abstract void route(java.lang.Object object)
                    throws ActionProcessingException
Route the message or message payload.

If the message is to be unwrapped, it will have been unwrapped at this stage.

Parameters:
object - The object to route.
Throws:
ActionProcessingException - Exception during routing operation.