org.codehaus.activemq.bean
Class BridgeBean

java.lang.Object
  extended byorg.codehaus.activemq.bean.BridgeBean
All Implemented Interfaces:
MessageListener

public class BridgeBean
extends Object
implements MessageListener

A simple Bridge POJO which will copy messages from one destination to another optionally performing some kind of transformation.

Version:
$Revision: 1.1 $

Constructor Summary
BridgeBean(Session session, MessageProducer producer, Destination destination)
           
 
Method Summary
protected  Message createOutputMessage(Message message)
          A strategy method to create a new message given an input message
protected  void enrich(Message outputMessage, Message inputMessage)
          A strategy method to allow a message to be enriched, such as to append some properties from the input message
protected  void onJMSException(JMSException e)
          Handle a JMS exception being thrown
 void onMessage(Message inputMessage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BridgeBean

public BridgeBean(Session session,
                  MessageProducer producer,
                  Destination destination)
Method Detail

onMessage

public void onMessage(Message inputMessage)
Specified by:
onMessage in interface MessageListener

enrich

protected void enrich(Message outputMessage,
                      Message inputMessage)
A strategy method to allow a message to be enriched, such as to append some properties from the input message

Parameters:
outputMessage -
inputMessage -

createOutputMessage

protected Message createOutputMessage(Message message)
                               throws JMSException
A strategy method to create a new message given an input message

Parameters:
message -
Returns:
Throws:
JMSException

onJMSException

protected void onJMSException(JMSException e)
Handle a JMS exception being thrown

Parameters:
e -


Copyright © 2004-2005 Protique, Ltd.. All Rights Reserved.