org.apache.activemq.camel
Class CamelMessageConsumer

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

public class CamelMessageConsumer
extends Object
implements MessageConsumer

A JMS MessageConsumer which consumes message exchanges from a Camel Endpoint


Constructor Summary
CamelMessageConsumer(CamelDestination destination, org.apache.camel.Endpoint endpoint, ActiveMQSession session, String messageSelector, boolean noLocal)
           
 
Method Summary
protected  void checkClosed()
           
 void close()
           
protected  org.apache.camel.Consumer createConsumer()
           
protected  Message createMessage(org.apache.camel.Exchange exchange)
           
 CamelDestination getDestination()
           
 org.apache.camel.Endpoint getEndpoint()
           
 MessageListener getMessageListener()
           
 String getMessageSelector()
           
protected  org.apache.camel.PollingConsumer getPollingConsumer()
           
 ActiveMQSession getSession()
           
 boolean isNoLocal()
           
 Message receive()
           
 Message receive(long timeoutMillis)
           
 Message receiveNoWait()
           
 void setMessageListener(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,
                            String messageSelector,
                            boolean noLocal)
Method Detail

close

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

getMessageListener

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

setMessageListener

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

receive

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

receive

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

receiveNoWait

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

getDestination

public CamelDestination getDestination()

getEndpoint

public org.apache.camel.Endpoint getEndpoint()

getMessageSelector

public String getMessageSelector()
Specified by:
getMessageSelector in interface MessageConsumer

isNoLocal

public boolean isNoLocal()

getSession

public ActiveMQSession getSession()

getPollingConsumer

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

createMessage

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

createConsumer

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

checkClosed

protected void checkClosed()
                    throws IllegalStateException
Throws:
IllegalStateException


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.