org.figure8.join.core.messaging
Class JMSProducerBean

java.lang.Object
  extended by org.springframework.jms.core.support.JmsGatewaySupport
      extended by org.figure8.join.core.messaging.JMSProducerBean
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
ResolverJMSProducerBean, SimpleJMSProducerBean

public abstract class JMSProducerBean
extends org.springframework.jms.core.support.JmsGatewaySupport

This is a base class for implementations needing to send JMS messages over a JMS destination. How to acquire detinations mechanism is left abstract. This base class also extends Spring container JMS support class in order to use Spring's features such as JmsTemplates ...

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Field Summary
protected  org.apache.commons.logging.Log log
          Commons logger.
 
Fields inherited from class org.springframework.jms.core.support.JmsGatewaySupport
logger
 
Constructor Summary
JMSProducerBean()
          Default constructor.
 
Method Summary
abstract  javax.jms.Destination getDestination()
          Abstract method that should be implemented by subclasses.
 void sendObjectMessage(java.io.Serializable obj)
          Send the given Serializable object as an object message onto destination.
 void sendObjectMessage(java.io.Serializable obj, java.util.Properties properties)
          Send the given Serializable object as an object message.
 void sendTextMessage(java.lang.String text)
          Send the given text as a text message onto destination.
 void sendTextMessage(java.lang.String text, java.util.Properties properties)
          Send the given text as a text message onto destination.
 
Methods inherited from class org.springframework.jms.core.support.JmsGatewaySupport
afterPropertiesSet, createJmsTemplate, getConnectionFactory, getJmsTemplate, initGateway, setConnectionFactory, setJmsTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log
Commons logger.

Constructor Detail

JMSProducerBean

public JMSProducerBean()
Default constructor.

Method Detail

sendTextMessage

public void sendTextMessage(java.lang.String text)
Send the given text as a text message onto destination.

Parameters:
text - Text to send as a JMS message

sendTextMessage

public void sendTextMessage(java.lang.String text,
                            java.util.Properties properties)
Send the given text as a text message onto destination. Add given properties as String properties on the sent message.

Parameters:
text - Text to send as a JMS Message
properties - String properties to add to JMS Message

sendObjectMessage

public void sendObjectMessage(java.io.Serializable obj)
Send the given Serializable object as an object message onto destination.

Parameters:
obj - The serializable object to send as a JMS Message

sendObjectMessage

public void sendObjectMessage(java.io.Serializable obj,
                              java.util.Properties properties)
Send the given Serializable object as an object message. Add given properties as String properties on the sent message.

Parameters:
obj - The serializable object to send as a JMS Message.
properties - String properties to add to JMS Message

getDestination

public abstract javax.jms.Destination getDestination()
Abstract method that should be implemented by subclasses. This method is left abstract because this base class does not impose a mechanism for acquiring a JMS Destination. This Destination may be injected as a dependency by Spring or retrieved using a specific resolver for remote destinations ...

Returns:
The JMS destination to use when sending messages.


Copyright © 2005-2008 Join. All Rights Reserved.