org.apache.activemq.camel
Class CamelMessageConsumer

java.lang.Object
  extended by org.apache.activemq.camel.CamelMessageConsumer
All Implemented Interfaces:
javax.jms.MessageConsumer
Direct Known Subclasses:
CamelQueueReceiver, CamelTopicSubscriber

public class CamelMessageConsumer
extends java.lang.Object
implements javax.jms.MessageConsumer

A JMS MessageConsumer which consumes message exchanges from a Camel Endpoint


Constructor Summary
CamelMessageConsumer(CamelDestination destination, org.apache.camel.Endpoint endpoint, ActiveMQSession session, java.lang.String messageSelector, boolean noLocal)
           
 
Method Summary
protected  void checkClosed()
           
 void close()
           
protected  org.apache.camel.Consumer createConsumer()
           
protected  javax.jms.Message createMessage(org.apache.camel.Exchange exchange)
           
 CamelDestination getDestination()
           
 org.apache.camel.Endpoint getEndpoint()
           
 javax.jms.MessageListener getMessageListener()
           
 java.lang.String getMessageSelector()
           
protected  org.apache.camel.PollingConsumer getPollingConsumer()
           
 ActiveMQSession getSession()
           
 boolean isNoLocal()
           
 javax.jms.Message receive()
           
 javax.jms.Message receive(long timeoutMillis)
           
 javax.jms.Message receiveNoWait()
           
 void setMessageListener(javax.jms.MessageListener messageListener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CamelMessageConsumer

public CamelMessageConsumer(CamelDestination destination,
                            org.apache.camel.Endpoint endpoint,
                            ActiveMQSession session,
                            java.lang.String messageSelector,
                            boolean noLocal)
Method Detail

close

public void close()
           throws javax.jms.JMSException
Specified by:
close in interface javax.jms.MessageConsumer
Throws:
javax.jms.JMSException

getMessageListener

public javax.jms.MessageListener getMessageListener()
                                             throws javax.jms.JMSException
Specified by:
getMessageListener in interface javax.jms.MessageConsumer
Throws:
javax.jms.JMSException

setMessageListener

public void setMessageListener(javax.jms.MessageListener messageListener)
                        throws javax.jms.JMSException
Specified by:
setMessageListener in interface javax.jms.MessageConsumer
Throws:
javax.jms.JMSException

receive

public javax.jms.Message receive()
                          throws javax.jms.JMSException
Specified by:
receive in interface javax.jms.MessageConsumer
Throws:
javax.jms.JMSException

receive

public javax.jms.Message receive(long timeoutMillis)
                          throws javax.jms.JMSException
Specified by:
receive in interface javax.jms.MessageConsumer
Throws:
javax.jms.JMSException

receiveNoWait

public javax.jms.Message receiveNoWait()
                                throws javax.jms.JMSException
Specified by:
receiveNoWait in interface javax.jms.MessageConsumer
Throws:
javax.jms.JMSException

getDestination

public CamelDestination getDestination()

getEndpoint

public org.apache.camel.Endpoint getEndpoint()

getMessageSelector

public java.lang.String getMessageSelector()
Specified by:
getMessageSelector in interface javax.jms.MessageConsumer

isNoLocal

public boolean isNoLocal()

getSession

public ActiveMQSession getSession()

getPollingConsumer

protected org.apache.camel.PollingConsumer getPollingConsumer()
                                                       throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createMessage

protected javax.jms.Message createMessage(org.apache.camel.Exchange exchange)
                                   throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createConsumer

protected org.apache.camel.Consumer createConsumer()
                                            throws javax.jms.JMSException
Throws:
javax.jms.JMSException

checkClosed

protected void checkClosed()
                    throws javax.jms.IllegalStateException
Throws:
javax.jms.IllegalStateException


Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.