org.logicblaze.lingo.jms
Class JmsClient

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

public class JmsClient
extends Object

A helper class for working with JMS from inside collection classes

Version:
$Revision$

Constructor Summary
JmsClient()
           
JmsClient(ConnectionFactory connectionFactory, Destination destination)
           
JmsClient(Destination destination, JmsProducer producer, MessageConsumer consumer)
           
 
Method Summary
 void close()
           
 void close(QueueBrowser browser)
           
 QueueBrowser createBrowser()
           
 Message createMessage(Object element)
           
 JmsProducerConfig getConfig()
           
 ConnectionFactory getConnectionFactory()
           
 MessageConsumer getConsumer()
           
 Destination getDestination()
           
 Marshaller getMarshaller()
           
 JmsProducer getProducer()
           
 String getSelector()
           
 void handleException(JMSException e)
           
 boolean isNoLocal()
           
protected  void onBrowserCloseException(JMSException e)
           
 Message peek()
           
 Object readMessage(Message message)
           
 Message receive()
           
 Message receive(long timeout, edu.emory.mathcs.backport.java.util.concurrent.TimeUnit unit)
           
 Message receiveNoWait()
           
 void send(Message message)
           
 void setConfig(JmsProducerConfig config)
           
 void setConnectionFactory(ConnectionFactory connectionFactory)
           
 void setConsumer(MessageConsumer consumer)
           
 void setDestination(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(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(ConnectionFactory connectionFactory,
                 Destination destination)

JmsClient

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

receiveNoWait

public Message receiveNoWait()
                      throws JMSException
Throws:
JMSException

receive

public Message receive()
                throws JMSException
Throws:
JMSException

receive

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

createBrowser

public QueueBrowser createBrowser()
                           throws JMSException
Throws:
JMSException

peek

public Message peek()
             throws JMSException
Throws:
JMSException

send

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

createMessage

public Message createMessage(Object element)
                      throws JMSException
Throws:
JMSException

handleException

public void handleException(JMSException e)

readMessage

public Object readMessage(Message message)
                   throws JMSException
Throws:
JMSException

close

public void close(QueueBrowser browser)

close

public void close()

getConsumer

public MessageConsumer getConsumer()
                            throws JMSException
Throws:
JMSException

setConsumer

public void setConsumer(MessageConsumer consumer)

getDestination

public Destination getDestination()

setDestination

public void setDestination(Destination destination)

getMarshaller

public Marshaller getMarshaller()

setMarshaller

public void setMarshaller(Marshaller marshaller)

getProducer

public JmsProducer getProducer()
                        throws JMSException
Throws:
JMSException

setProducer

public void setProducer(JmsProducer producer)

getConfig

public JmsProducerConfig getConfig()

setConfig

public void setConfig(JmsProducerConfig config)

getConnectionFactory

public ConnectionFactory getConnectionFactory()

setConnectionFactory

public void setConnectionFactory(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 String getSelector()

setSelector

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


onBrowserCloseException

protected void onBrowserCloseException(JMSException e)


Copyright © 2005-2006 LogicBlaze, Inc.. All Rights Reserved.