org.codehaus.activemq.bean
Class JmsHelper

java.lang.Object
  extended byorg.codehaus.activemq.bean.JmsHelper

public class JmsHelper
extends Object

A helper base class POJO which can be used by any POJO deployed in the JMS container.

This POJO supports both container based and setter based injection.

Version:
$Revision: 1.1 $

Constructor Summary
JmsHelper()
           
JmsHelper(Session session, MessageProducer producer)
           
 
Method Summary
 Message call(Destination destination, Message request)
          Performs an RPC to the given destination - blocking until a reply is received up to some maximum timeout
 Message call(Destination destination, Message request, long timeout)
          Performs an RPC to the given destination - blocking until a reply is received up to the given timeout
 ObjectMessage createObjectMessage(Serializable object)
           
 TextMessage createTextMessage(String text)
           
 long getDefaultTimeout()
           
 MessageProducer getProducer()
           
 Session getSession()
           
 void send(Destination destination, Message message)
           
 void send(Message message)
           
 void send(String subject, Message message, boolean isTopic)
           
 void setDefaultTimeout(long defaultTimeout)
           
 void setProducer(MessageProducer producer)
           
 void setSession(Session session)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsHelper

public JmsHelper()

JmsHelper

public JmsHelper(Session session,
                 MessageProducer producer)
Method Detail

send

public void send(Destination destination,
                 Message message)
          throws JMSException
Throws:
JMSException

send

public void send(Message message)
          throws JMSException
Throws:
JMSException

send

public void send(String subject,
                 Message message,
                 boolean isTopic)
          throws JMSException
Throws:
JMSException

call

public Message call(Destination destination,
                    Message request,
                    long timeout)
             throws JMSException
Performs an RPC to the given destination - blocking until a reply is received up to the given timeout

Parameters:
destination -
request -
Returns:
Throws:
JMSException

call

public Message call(Destination destination,
                    Message request)
             throws JMSException
Performs an RPC to the given destination - blocking until a reply is received up to some maximum timeout

Parameters:
destination -
request -
Returns:
Throws:
JMSException

createTextMessage

public TextMessage createTextMessage(String text)
                              throws JMSException
Throws:
JMSException

createObjectMessage

public ObjectMessage createObjectMessage(Serializable object)
                                  throws JMSException
Throws:
JMSException

getSession

public Session getSession()

setSession

public void setSession(Session session)

getProducer

public MessageProducer getProducer()

setProducer

public void setProducer(MessageProducer producer)

getDefaultTimeout

public long getDefaultTimeout()

setDefaultTimeout

public void setDefaultTimeout(long defaultTimeout)


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