org.apache.activemq.camel
Class CamelMessageProducer

java.lang.Object
  extended by org.apache.activemq.ActiveMQMessageProducerSupport
      extended by org.apache.activemq.camel.CamelMessageProducer
All Implemented Interfaces:
MessageProducer, Closeable
Direct Known Subclasses:
CamelQueueSender, CamelTopicPublisher

public class CamelMessageProducer
extends ActiveMQMessageProducerSupport

A JMS MessageProducer which sends message exchanges to a Camel Endpoint


Field Summary
protected  org.apache.camel.Producer producer
           
 
Fields inherited from class org.apache.activemq.ActiveMQMessageProducerSupport
defaultDeliveryMode, defaultPriority, defaultTimeToLive, disableMessageID, disableMessageTimestamp, sendTimeout, session
 
Constructor Summary
CamelMessageProducer(CamelDestination destination, org.apache.camel.Endpoint endpoint, ActiveMQSession session)
           
 
Method Summary
protected  void checkClosed()
           
 void close()
          Closes a JMS object.
 CamelDestination getDestination()
           
 org.apache.camel.Endpoint getEndpoint()
           
 void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive)
           
 
Methods inherited from class org.apache.activemq.ActiveMQMessageProducerSupport
getDeliveryMode, getDisableMessageID, getDisableMessageTimestamp, getPriority, getSendTimeout, getTimeToLive, send, send, send, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setSendTimeout, setTimeToLive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

producer

protected org.apache.camel.Producer producer
Constructor Detail

CamelMessageProducer

public CamelMessageProducer(CamelDestination destination,
                            org.apache.camel.Endpoint endpoint,
                            ActiveMQSession session)
                     throws JMSException
Throws:
JMSException
Method Detail

getDestination

public CamelDestination getDestination()
                                throws JMSException
Throws:
JMSException

getEndpoint

public org.apache.camel.Endpoint getEndpoint()

close

public void close()
           throws JMSException
Description copied from interface: Closeable
Closes a JMS object.

Many JMS objects are closeable such as Connections, Sessions, Consumers and Producers.

Throws:
JMSException - if the JMS provider fails to close the object due to some internal error.

send

public void send(Destination destination,
                 Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
          throws JMSException
Throws:
JMSException

checkClosed

protected void checkClosed()
                    throws IllegalStateException
Specified by:
checkClosed in class ActiveMQMessageProducerSupport
Throws:
IllegalStateException


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.