org.apache.servicemix.jms.endpoints
Class SimpleDestinationChooser

java.lang.Object
  extended by org.apache.servicemix.jms.endpoints.SimpleDestinationChooser
All Implemented Interfaces:
DestinationChooser

public class SimpleDestinationChooser
extends java.lang.Object
implements DestinationChooser

A simple destination chooser which will use the value of the DESTINATION_KEY property on the message exchange, or fall back to a default destination

Version:
$Revision$

Field Summary
static java.lang.String DESTINATION_KEY
           
 
Constructor Summary
SimpleDestinationChooser()
           
SimpleDestinationChooser(javax.jms.Destination defaultDestination)
           
SimpleDestinationChooser(java.lang.String defaultDestinationName)
           
 
Method Summary
 java.lang.Object chooseDestination(javax.jbi.messaging.MessageExchange exchange, java.lang.Object message)
          Chooses which JMS destintation to use for the given message.
 javax.jms.Destination getDefaultDestination()
           
 java.lang.String getDefaultDestinationName()
           
 void setDefaultDestination(javax.jms.Destination defaultDestination)
           
 void setDefaultDestinationName(java.lang.String defaultDestinationName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESTINATION_KEY

public static final java.lang.String DESTINATION_KEY
See Also:
Constant Field Values
Constructor Detail

SimpleDestinationChooser

public SimpleDestinationChooser()

SimpleDestinationChooser

public SimpleDestinationChooser(javax.jms.Destination defaultDestination)

SimpleDestinationChooser

public SimpleDestinationChooser(java.lang.String defaultDestinationName)
Method Detail

chooseDestination

public java.lang.Object chooseDestination(javax.jbi.messaging.MessageExchange exchange,
                                          java.lang.Object message)
Description copied from interface: DestinationChooser
Chooses which JMS destintation to use for the given message. The message may be the "in", "out" or "fault" message.

Specified by:
chooseDestination in interface DestinationChooser
Parameters:
exchange - the exchange
message - the message can be a javax.jbi.messaging.NormalizedMessage, a javax.jbi.messaging.Fault or an Exception
Returns:
a javax.jms.Destination or String for the destination name

getDefaultDestination

public javax.jms.Destination getDefaultDestination()

setDefaultDestination

public void setDefaultDestination(javax.jms.Destination defaultDestination)

getDefaultDestinationName

public java.lang.String getDefaultDestinationName()

setDefaultDestinationName

public void setDefaultDestinationName(java.lang.String defaultDestinationName)


Copyright © 2005-2014 FuseSource. All Rights Reserved.