org.logicblaze.lingo.jms
Class JmsClient

java.lang.Object
  extended by org.logicblaze.lingo.jms.JmsClient

public class JmsClient
extends java.lang.Object

A helper class for working with JMS from inside collection classes

Version:
$Revision$

Constructor Summary
JmsClient()
           
JmsClient(javax.jms.ConnectionFactory connectionFactory, javax.jms.Destination destination)
           
JmsClient(javax.jms.Destination destination, JmsProducer producer, javax.jms.MessageConsumer consumer)
           
 
Method Summary
 void close()
           
 void close(javax.jms.QueueBrowser browser)
           
 javax.jms.QueueBrowser createBrowser()
           
 javax.jms.Message createMessage(java.lang.Object element)
           
 JmsProducerConfig getConfig()
           
 javax.jms.ConnectionFactory getConnectionFactory()
           
 javax.jms.MessageConsumer getConsumer()
           
 javax.jms.Destination getDestination()
           
 Marshaller getMarshaller()
           
 JmsProducer getProducer()
           
 java.lang.String getSelector()
           
 void handleException(javax.jms.JMSException e)
           
 boolean isNoLocal()
           
protected  void onBrowserCloseException(javax.jms.JMSException e)
           
 javax.jms.Message peek()
           
 java.lang.Object readMessage(javax.jms.Message message)
           
 javax.jms.Message receive()
           
 javax.jms.Message receive(long timeout, edu.emory.mathcs.backport.java.util.concurrent.TimeUnit unit)
           
 javax.jms.Message receiveNoWait()
           
 void send(javax.jms.Message message)
           
 void setConfig(JmsProducerConfig config)
           
 void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
           
 void setConsumer(javax.jms.MessageConsumer consumer)
           
 void setDestination(javax.jms.Destination destination)
           
 void setMarshaller(Marshaller marshaller)
           
 void setNoLocal(boolean noLocal)
          Sets if messages sent by this process should be visible to this JVM
 void setProducer(JmsProducer producer)
           
 void setSelector(java.lang.String selector)
          Sets the JMS message selector to filter out messages from the consumer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsClient

public JmsClient()

JmsClient

public JmsClient(javax.jms.ConnectionFactory connectionFactory,
                 javax.jms.Destination destination)

JmsClient

public JmsClient(javax.jms.Destination destination,
                 JmsProducer producer,
                 javax.jms.MessageConsumer consumer)
Method Detail

receiveNoWait

public javax.jms.Message receiveNoWait()
                                throws javax.jms.JMSException
Throws:
javax.jms.JMSException

receive

public javax.jms.Message receive()
                          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

receive

public javax.jms.Message receive(long timeout,
                                 edu.emory.mathcs.backport.java.util.concurrent.TimeUnit unit)
                          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createBrowser

public javax.jms.QueueBrowser createBrowser()
                                     throws javax.jms.JMSException
Throws:
javax.jms.JMSException

peek

public javax.jms.Message peek()
                       throws javax.jms.JMSException
Throws:
javax.jms.JMSException

send

public void send(javax.jms.Message message)
          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createMessage

public javax.jms.Message createMessage(java.lang.Object element)
                                throws javax.jms.JMSException
Throws:
javax.jms.JMSException

handleException

public void handleException(javax.jms.JMSException e)

readMessage

public java.lang.Object readMessage(javax.jms.Message message)
                             throws javax.jms.JMSException
Throws:
javax.jms.JMSException

close

public void close(javax.jms.QueueBrowser browser)

close

public void close()

getConsumer

public javax.jms.MessageConsumer getConsumer()
                                      throws javax.jms.JMSException
Throws:
javax.jms.JMSException

setConsumer

public void setConsumer(javax.jms.MessageConsumer consumer)

getDestination

public javax.jms.Destination getDestination()

setDestination

public void setDestination(javax.jms.Destination destination)

getMarshaller

public Marshaller getMarshaller()

setMarshaller

public void setMarshaller(Marshaller marshaller)

getProducer

public JmsProducer getProducer()
                        throws javax.jms.JMSException
Throws:
javax.jms.JMSException

setProducer

public void setProducer(JmsProducer producer)

getConfig

public JmsProducerConfig getConfig()

setConfig

public void setConfig(JmsProducerConfig config)

getConnectionFactory

public javax.jms.ConnectionFactory getConnectionFactory()

setConnectionFactory

public void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)

isNoLocal

public boolean isNoLocal()

setNoLocal

public void setNoLocal(boolean noLocal)
Sets if messages sent by this process should be visible to this JVM


getSelector

public java.lang.String getSelector()

setSelector

public void setSelector(java.lang.String selector)
Sets the JMS message selector to filter out messages from the consumer


onBrowserCloseException

protected void onBrowserCloseException(javax.jms.JMSException e)


Copyright © 2009 LogicBlaze, Inc.. All Rights Reserved.