org.apache.camel.component.jms
Class JmsComponent

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultComponent
          extended by org.apache.camel.impl.UriEndpointComponent
              extended by org.apache.camel.component.jms.JmsComponent
All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.Component, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HeaderFilterStrategyAware, org.apache.camel.StatefulService, org.apache.camel.SuspendableService, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class JmsComponent
extends org.apache.camel.impl.UriEndpointComponent
implements org.springframework.context.ApplicationContextAware, org.apache.camel.spi.HeaderFilterStrategyAware

A JMS Component

Version:

Field Summary
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
JmsComponent()
           
JmsComponent(org.apache.camel.CamelContext context)
           
JmsComponent(JmsConfiguration configuration)
           
 
Method Summary
protected  String convertPathToActualDestination(String path, Map<String,Object> parameters)
          A strategy method allowing the URI destination to be translated into the actual JMS destination name (say by looking up in JNDI or something)
protected  JmsConfiguration createConfiguration()
          Factory method to create the default configuration instance
protected  org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters)
           
protected  void doShutdown()
           
protected  void doStart()
           
protected  ExecutorService getAsyncStartStopExecutorService()
           
 JmsConfiguration getConfiguration()
           
 org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
           
 QueueBrowseStrategy getQueueBrowseStrategy()
           
static JmsComponent jmsComponent()
          Static builder method
static JmsComponent jmsComponent(javax.jms.ConnectionFactory connectionFactory)
          Static builder method
static JmsComponent jmsComponent(JmsConfiguration configuration)
          Static builder method
static JmsComponent jmsComponentAutoAcknowledge(javax.jms.ConnectionFactory connectionFactory)
          Static builder method
static JmsComponent jmsComponentClientAcknowledge(javax.jms.ConnectionFactory connectionFactory)
          Static builder method
static JmsComponent jmsComponentTransacted(javax.jms.ConnectionFactory connectionFactory)
           
static JmsComponent jmsComponentTransacted(javax.jms.ConnectionFactory connectionFactory, org.springframework.transaction.PlatformTransactionManager transactionManager)
           
 void setAcceptMessagesWhileStopping(boolean acceptMessagesWhileStopping)
           
 void setAcknowledgementMode(int consumerAcknowledgementMode)
           
 void setAcknowledgementModeName(String consumerAcknowledgementMode)
           
 void setAllowNullBody(boolean allowNullBody)
           
 void setAlwaysCopyMessage(boolean alwaysCopyMessage)
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setAsyncConsumer(boolean asyncConsumer)
           
 void setAsyncStartListener(boolean asyncStartListener)
           
 void setAsyncStopListener(boolean asyncStopListener)
           
 void setAutoStartup(boolean autoStartup)
           
 void setCacheLevel(int cacheLevel)
           
 void setCacheLevelName(String cacheName)
           
 void setClientId(String consumerClientId)
           
 void setConcurrentConsumers(int concurrentConsumers)
           
 void setConfiguration(JmsConfiguration configuration)
          Sets the JMS configuration
 void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
           
 void setDefaultTaskExecutorType(DefaultTaskExecutorType type)
           
 void setDeliveryMode(Integer deliveryMode)
           
 void setDeliveryPersistent(boolean deliveryPersistent)
           
 void setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver destinationResolver)
           
 void setDurableSubscriptionName(String durableSubscriptionName)
           
 void setEagerLoadingOfProperties(boolean eagerLoadingOfProperties)
           
 void setErrorHandler(org.springframework.util.ErrorHandler errorHandler)
           
 void setErrorHandlerLoggingLevel(org.apache.camel.LoggingLevel errorHandlerLoggingLevel)
           
 void setErrorHandlerLogStackTrace(boolean errorHandlerLogStackTrace)
           
 void setExceptionListener(javax.jms.ExceptionListener exceptionListener)
           
 void setExplicitQosEnabled(boolean explicitQosEnabled)
           
 void setExposeListenerSession(boolean exposeListenerSession)
           
 void setForceSendOriginalMessage(boolean forceSendOriginalMessage)
           
 void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
           
 void setIdleConsumerLimit(int idleConsumerLimit)
           
 void setIdleTaskExecutionLimit(int idleTaskExecutionLimit)
           
 void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties)
           
 void setIncludeSentJMSMessageID(boolean includeSentJMSMessageID)
           
 void setJmsKeyFormatStrategy(JmsKeyFormatStrategy jmsKeyFormatStrategy)
           
 void setJmsKeyFormatStrategy(String jmsKeyFormatStrategyName)
           
 void setJmsOperations(org.springframework.jms.core.JmsOperations jmsOperations)
           
 void setLazyCreateTransactionManager(boolean lazyCreating)
           
 void setMapJmsMessage(boolean mapJmsMessage)
           
 void setMaxConcurrentConsumers(int maxConcurrentConsumers)
           
 void setMaxMessagesPerTask(int maxMessagesPerTask)
           
 void setMessageConverter(org.springframework.jms.support.converter.MessageConverter messageConverter)
           
 void setMessageIdEnabled(boolean messageIdEnabled)
           
 void setMessageTimestampEnabled(boolean messageTimestampEnabled)
           
 void setPreserveMessageQos(boolean preserveMessageQos)
           
 void setPriority(int priority)
           
 void setPubSubNoLocal(boolean pubSubNoLocal)
           
 void setQueueBrowseStrategy(QueueBrowseStrategy queueBrowseStrategy)
           
 void setReceiveTimeout(long receiveTimeout)
           
 void setRecoveryInterval(long recoveryInterval)
           
 void setReplyToCacheLevelName(String cacheName)
           
 void setReplyToType(ReplyToType replyToType)
           
 void setRequestTimeout(long requestTimeout)
           
 void setRequestTimeoutCheckerInterval(long requestTimeoutCheckerInterval)
           
 void setSubscriptionDurable(boolean subscriptionDurable)
          Deprecated. 
 void setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
           
 void setTestConnectionOnStartup(boolean testConnectionOnStartup)
           
 void setTimeToLive(long timeToLive)
           
 void setTransacted(boolean consumerTransacted)
           
 void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
           
 void setTransactionName(String transactionName)
           
 void setTransactionTimeout(int transactionTimeout)
           
 void setTransferException(boolean transferException)
           
 void setTransferExchange(boolean transferExchange)
           
 void setUseMessageIDAsCorrelationID(boolean useMessageIDAsCorrelationID)
           
 
Methods inherited from class org.apache.camel.impl.UriEndpointComponent
createComponentConfiguration, createParameterConfigurationMap, getEndpointClass, getParameterConfigurationMap, populateParameterConfigurationMap, setEndpointClass
 
Methods inherited from class org.apache.camel.impl.DefaultComponent
afterConfiguration, createConfiguration, createEndpoint, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, ifStartsWithReturnRemainder, preProcessUri, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsComponent

public JmsComponent()

JmsComponent

public JmsComponent(org.apache.camel.CamelContext context)

JmsComponent

public JmsComponent(JmsConfiguration configuration)
Method Detail

jmsComponent

public static JmsComponent jmsComponent()
Static builder method


jmsComponent

public static JmsComponent jmsComponent(JmsConfiguration configuration)
Static builder method


jmsComponent

public static JmsComponent jmsComponent(javax.jms.ConnectionFactory connectionFactory)
Static builder method


jmsComponentClientAcknowledge

public static JmsComponent jmsComponentClientAcknowledge(javax.jms.ConnectionFactory connectionFactory)
Static builder method


jmsComponentAutoAcknowledge

public static JmsComponent jmsComponentAutoAcknowledge(javax.jms.ConnectionFactory connectionFactory)
Static builder method


jmsComponentTransacted

public static JmsComponent jmsComponentTransacted(javax.jms.ConnectionFactory connectionFactory)

jmsComponentTransacted

public static JmsComponent jmsComponentTransacted(javax.jms.ConnectionFactory connectionFactory,
                                                  org.springframework.transaction.PlatformTransactionManager transactionManager)

getConfiguration

public JmsConfiguration getConfiguration()

setConfiguration

public void setConfiguration(JmsConfiguration configuration)
Sets the JMS configuration

Parameters:
configuration - the configuration to use by default for endpoints

setAcceptMessagesWhileStopping

public void setAcceptMessagesWhileStopping(boolean acceptMessagesWhileStopping)

setAcknowledgementMode

public void setAcknowledgementMode(int consumerAcknowledgementMode)

setEagerLoadingOfProperties

public void setEagerLoadingOfProperties(boolean eagerLoadingOfProperties)

setAcknowledgementModeName

public void setAcknowledgementModeName(String consumerAcknowledgementMode)

setAutoStartup

public void setAutoStartup(boolean autoStartup)

setCacheLevel

public void setCacheLevel(int cacheLevel)

setCacheLevelName

public void setCacheLevelName(String cacheName)

setReplyToCacheLevelName

public void setReplyToCacheLevelName(String cacheName)

setClientId

public void setClientId(String consumerClientId)

setConcurrentConsumers

public void setConcurrentConsumers(int concurrentConsumers)

setConnectionFactory

public void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)

setDeliveryPersistent

public void setDeliveryPersistent(boolean deliveryPersistent)

setDeliveryMode

public void setDeliveryMode(Integer deliveryMode)

setDurableSubscriptionName

public void setDurableSubscriptionName(String durableSubscriptionName)

setExceptionListener

public void setExceptionListener(javax.jms.ExceptionListener exceptionListener)

setErrorHandler

public void setErrorHandler(org.springframework.util.ErrorHandler errorHandler)

setErrorHandlerLoggingLevel

public void setErrorHandlerLoggingLevel(org.apache.camel.LoggingLevel errorHandlerLoggingLevel)

setErrorHandlerLogStackTrace

public void setErrorHandlerLogStackTrace(boolean errorHandlerLogStackTrace)

setExplicitQosEnabled

public void setExplicitQosEnabled(boolean explicitQosEnabled)

setExposeListenerSession

public void setExposeListenerSession(boolean exposeListenerSession)

setIdleTaskExecutionLimit

public void setIdleTaskExecutionLimit(int idleTaskExecutionLimit)

setIdleConsumerLimit

public void setIdleConsumerLimit(int idleConsumerLimit)

setMaxConcurrentConsumers

public void setMaxConcurrentConsumers(int maxConcurrentConsumers)

setMaxMessagesPerTask

public void setMaxMessagesPerTask(int maxMessagesPerTask)

setMessageConverter

public void setMessageConverter(org.springframework.jms.support.converter.MessageConverter messageConverter)

setMapJmsMessage

public void setMapJmsMessage(boolean mapJmsMessage)

setMessageIdEnabled

public void setMessageIdEnabled(boolean messageIdEnabled)

setMessageTimestampEnabled

public void setMessageTimestampEnabled(boolean messageTimestampEnabled)

setAlwaysCopyMessage

public void setAlwaysCopyMessage(boolean alwaysCopyMessage)

setUseMessageIDAsCorrelationID

public void setUseMessageIDAsCorrelationID(boolean useMessageIDAsCorrelationID)

setPriority

public void setPriority(int priority)

setPubSubNoLocal

public void setPubSubNoLocal(boolean pubSubNoLocal)

setReceiveTimeout

public void setReceiveTimeout(long receiveTimeout)

setRecoveryInterval

public void setRecoveryInterval(long recoveryInterval)

setSubscriptionDurable

@Deprecated
public void setSubscriptionDurable(boolean subscriptionDurable)
Deprecated. 


setTaskExecutor

public void setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)

setTimeToLive

public void setTimeToLive(long timeToLive)

setTransacted

public void setTransacted(boolean consumerTransacted)

setLazyCreateTransactionManager

public void setLazyCreateTransactionManager(boolean lazyCreating)

setTransactionManager

public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)

setTransactionName

public void setTransactionName(String transactionName)

setTransactionTimeout

public void setTransactionTimeout(int transactionTimeout)

setTestConnectionOnStartup

public void setTestConnectionOnStartup(boolean testConnectionOnStartup)

setAsyncStartListener

public void setAsyncStartListener(boolean asyncStartListener)

setAsyncStopListener

public void setAsyncStopListener(boolean asyncStopListener)

setForceSendOriginalMessage

public void setForceSendOriginalMessage(boolean forceSendOriginalMessage)

setRequestTimeout

public void setRequestTimeout(long requestTimeout)

setRequestTimeoutCheckerInterval

public void setRequestTimeoutCheckerInterval(long requestTimeoutCheckerInterval)

setTransferExchange

public void setTransferExchange(boolean transferExchange)

setTransferException

public void setTransferException(boolean transferException)

setJmsOperations

public void setJmsOperations(org.springframework.jms.core.JmsOperations jmsOperations)

setDestinationResolver

public void setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver destinationResolver)

setReplyToType

public void setReplyToType(ReplyToType replyToType)

setPreserveMessageQos

public void setPreserveMessageQos(boolean preserveMessageQos)

setAsyncConsumer

public void setAsyncConsumer(boolean asyncConsumer)

setAllowNullBody

public void setAllowNullBody(boolean allowNullBody)

setIncludeSentJMSMessageID

public void setIncludeSentJMSMessageID(boolean includeSentJMSMessageID)

setIncludeAllJMSXProperties

public void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties)

setDefaultTaskExecutorType

public void setDefaultTaskExecutorType(DefaultTaskExecutorType type)

setJmsKeyFormatStrategy

public void setJmsKeyFormatStrategy(JmsKeyFormatStrategy jmsKeyFormatStrategy)

setJmsKeyFormatStrategy

public void setJmsKeyFormatStrategy(String jmsKeyFormatStrategyName)

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

getQueueBrowseStrategy

public QueueBrowseStrategy getQueueBrowseStrategy()

setQueueBrowseStrategy

public void setQueueBrowseStrategy(QueueBrowseStrategy queueBrowseStrategy)

getHeaderFilterStrategy

public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
Specified by:
getHeaderFilterStrategy in interface org.apache.camel.spi.HeaderFilterStrategyAware

setHeaderFilterStrategy

public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
Specified by:
setHeaderFilterStrategy in interface org.apache.camel.spi.HeaderFilterStrategyAware

doStart

protected void doStart()
                throws Exception
Overrides:
doStart in class org.apache.camel.impl.DefaultComponent
Throws:
Exception

doShutdown

protected void doShutdown()
                   throws Exception
Overrides:
doShutdown in class org.apache.camel.support.ServiceSupport
Throws:
Exception

getAsyncStartStopExecutorService

protected ExecutorService getAsyncStartStopExecutorService()

createEndpoint

protected org.apache.camel.Endpoint createEndpoint(String uri,
                                                   String remaining,
                                                   Map<String,Object> parameters)
                                            throws Exception
Specified by:
createEndpoint in class org.apache.camel.impl.DefaultComponent
Throws:
Exception

convertPathToActualDestination

protected String convertPathToActualDestination(String path,
                                                Map<String,Object> parameters)
A strategy method allowing the URI destination to be translated into the actual JMS destination name (say by looking up in JNDI or something)


createConfiguration

protected JmsConfiguration createConfiguration()
Factory method to create the default configuration instance

Returns:
a newly created configuration object which can then be further customized


Apache Camel