Package org.apache.camel.component.sjms
Class SjmsEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.component.sjms.SjmsEndpoint
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.AsyncEndpoint
,org.apache.camel.CamelContextAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.MultipleConsumersSupport
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasId
,org.apache.camel.spi.HeaderFilterStrategyAware
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="2.11.0",
scheme="sjms",
title="Simple JMS",
syntax="sjms:destinationType:destinationName",
category=MESSAGING,
headersClass=SjmsConstants.class)
public class SjmsEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements org.apache.camel.AsyncEndpoint, org.apache.camel.MultipleConsumersSupport, org.apache.camel.spi.HeaderFilterStrategyAware
Send and receive messages to/from a JMS Queue or Topic using plain JMS 1.x API.
This component uses plain JMS API where as the jms component uses Spring JMS.
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
-
Constructor Summary
ConstructorDescriptionSjmsEndpoint
(String uri, org.apache.camel.Component component, String remaining) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
When one of the QoS properties are configured such assetDeliveryPersistent(boolean)
,setPriority(int)
orsetTimeToLive(long)
then we should auto default the setting ofsetExplicitQosEnabled(Boolean)
if its not been configured yetvoid
protected JmsBinding
Creates theJmsBinding
to use.org.apache.camel.Consumer
createConsumer
(org.apache.camel.Processor processor) org.apache.camel.Exchange
createExchange
(jakarta.jms.Message message, jakarta.jms.Session session) Factory method for creating a new template for InOnly message exchangesFactory method for creating a new template for InOut message exchangescreateMessageListenerContainer
(SjmsEndpoint endpoint) org.apache.camel.PollingConsumer
org.apache.camel.Producer
protected void
doInit()
protected ExecutorService
int
jakarta.jms.ConnectionFactory
Gets the destination name which was configured from the endpoint uri.jakarta.jms.ExceptionListener
org.apache.camel.spi.HeaderFilterStrategy
int
long
int
long
long
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isTopic()
boolean
boolean
void
setAcknowledgementMode
(SessionAcknowledgementType acknowledgementMode) void
setAllowNullBody
(boolean allowNullBody) void
setAsyncConsumer
(boolean asyncConsumer) void
setAsyncStartListener
(boolean asyncStartListener) void
setAsyncStopListener
(boolean asyncStopListener) void
setAutoStartup
(boolean autoStartup) void
setBinding
(JmsBinding binding) void
setClientId
(String clientId) void
setConcurrentConsumers
(int concurrentConsumers) void
setConnectionFactory
(jakarta.jms.ConnectionFactory connectionFactory) void
setDeliveryMode
(Integer deliveryMode) void
setDeliveryPersistent
(boolean deliveryPersistent) void
setDestinationCreationStrategy
(DestinationCreationStrategy destinationCreationStrategy) void
setDestinationName
(String destinationName) void
setDisableReplyTo
(boolean disableReplyTo) void
setDisableTimeToLive
(boolean disableTimeToLive) void
setDurableSubscriptionName
(String durableSubscriptionName) void
setEagerLoadingOfProperties
(boolean eagerLoadingOfProperties) void
setEagerPoisonBody
(String eagerPoisonBody) void
setExceptionListener
(jakarta.jms.ExceptionListener exceptionListener) void
setExplicitQosEnabled
(Boolean explicitQosEnabled) void
setHeaderFilterStrategy
(org.apache.camel.spi.HeaderFilterStrategy strategy) void
setIncludeAllJMSXProperties
(boolean includeAllJMSXProperties) void
setJmsKeyFormatStrategy
(JmsKeyFormatStrategy jmsKeyFormatStrategy) void
setJmsObjectFactory
(JmsObjectFactory jmsObjectFactory) void
setMapJmsMessage
(boolean mapJmsMessage) void
setMessageCreatedStrategy
(MessageCreatedStrategy messageCreatedStrategy) void
setMessageSelector
(String messageSelector) void
setPreserveMessageQos
(boolean preserveMessageQos) void
setPriority
(int priority) void
setRecoveryInterval
(long recoveryInterval) void
setReplyTo
(String replyTo) void
setReplyToConcurrentConsumers
(int replyToConcurrentConsumers) void
setReplyToDeliveryPersistent
(boolean replyToDeliveryPersistent) void
setReplyToOverride
(String replyToOverride) void
setReplyToSameDestinationAllowed
(boolean replyToSameDestinationAllowed) void
setReplyToType
(ReplyToType replyToType) void
setRequestTimeout
(long requestTimeout) void
setSynchronous
(boolean synchronous) void
setTestConnectionOnStartup
(boolean testConnectionOnStartup) void
setTimeToLive
(long timeToLive) void
setTransacted
(boolean transacted) void
setTransferException
(boolean transferException) Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.Endpoint
configureExchange, configureProperties, createAsyncProducer, createExchange, createExchange, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, getExchangePattern, isLenientProperties, isSingletonProducer, setCamelContext
Methods inherited from interface org.apache.camel.IsSingleton
isSingleton
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
SjmsEndpoint
public SjmsEndpoint() -
SjmsEndpoint
-
-
Method Details
-
getComponent
- Overrides:
getComponent
in classorg.apache.camel.support.DefaultEndpoint
-
doInit
- Overrides:
doInit
in classorg.apache.camel.support.DefaultEndpoint
- Throws:
Exception
-
getEndpointConfiguredDestinationName
Gets the destination name which was configured from the endpoint uri.- Returns:
- the destination name resolved from the endpoint uri
-
createProducer
- Specified by:
createProducer
in interfaceorg.apache.camel.Endpoint
- Throws:
Exception
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Specified by:
createConsumer
in interfaceorg.apache.camel.Endpoint
- Throws:
Exception
-
createPollingConsumer
- Specified by:
createPollingConsumer
in interfaceorg.apache.camel.Endpoint
- Overrides:
createPollingConsumer
in classorg.apache.camel.support.DefaultEndpoint
- Throws:
Exception
-
configureMessageListener
-
isMultipleConsumersSupported
public boolean isMultipleConsumersSupported()- Specified by:
isMultipleConsumersSupported
in interfaceorg.apache.camel.MultipleConsumersSupport
-
createExchange
public org.apache.camel.Exchange createExchange(jakarta.jms.Message message, jakarta.jms.Session session) -
createInOnlyTemplate
Factory method for creating a new template for InOnly message exchanges -
createInOutTemplate
Factory method for creating a new template for InOut message exchanges -
createMessageListenerContainer
-
configuredQoS
protected void configuredQoS()When one of the QoS properties are configured such assetDeliveryPersistent(boolean)
,setPriority(int)
orsetTimeToLive(long)
then we should auto default the setting ofsetExplicitQosEnabled(Boolean)
if its not been configured yet -
isPreserveMessageQos
public boolean isPreserveMessageQos() -
setPreserveMessageQos
public void setPreserveMessageQos(boolean preserveMessageQos) -
getBinding
-
createBinding
Creates theJmsBinding
to use. -
setBinding
-
getAsyncStartStopExecutorService
-
setDestinationName
-
getDestinationName
-
getHeaderFilterStrategy
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()- Specified by:
getHeaderFilterStrategy
in interfaceorg.apache.camel.spi.HeaderFilterStrategyAware
-
setHeaderFilterStrategy
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy) - Specified by:
setHeaderFilterStrategy
in interfaceorg.apache.camel.spi.HeaderFilterStrategyAware
-
isIncludeAllJMSXProperties
public boolean isIncludeAllJMSXProperties() -
setIncludeAllJMSXProperties
public void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties) -
getAcknowledgementMode
-
setAcknowledgementMode
-
isTopic
public boolean isTopic() -
getConcurrentConsumers
public int getConcurrentConsumers() -
setConcurrentConsumers
public void setConcurrentConsumers(int concurrentConsumers) -
getReplyToConcurrentConsumers
public int getReplyToConcurrentConsumers() -
setReplyToConcurrentConsumers
public void setReplyToConcurrentConsumers(int replyToConcurrentConsumers) -
getExplicitQosEnabled
-
setExplicitQosEnabled
-
isExplicitQosEnabled
public boolean isExplicitQosEnabled() -
getPriority
public int getPriority() -
setPriority
public void setPriority(int priority) -
isDeliveryPersistent
public boolean isDeliveryPersistent() -
setDeliveryPersistent
public void setDeliveryPersistent(boolean deliveryPersistent) -
isDisableReplyTo
public boolean isDisableReplyTo() -
setDisableReplyTo
public void setDisableReplyTo(boolean disableReplyTo) -
getReplyToOverride
-
setReplyToOverride
-
isReplyToDeliveryPersistent
public boolean isReplyToDeliveryPersistent() -
setReplyToDeliveryPersistent
public void setReplyToDeliveryPersistent(boolean replyToDeliveryPersistent) -
getEagerPoisonBody
-
isEagerLoadingOfProperties
public boolean isEagerLoadingOfProperties() -
setEagerLoadingOfProperties
public void setEagerLoadingOfProperties(boolean eagerLoadingOfProperties) -
setEagerPoisonBody
-
getDeliveryMode
-
setDeliveryMode
-
getTimeToLive
public long getTimeToLive() -
setTimeToLive
public void setTimeToLive(long timeToLive) -
getClientId
-
setClientId
-
getDurableSubscriptionName
-
setDurableSubscriptionName
-
getRequestTimeout
public long getRequestTimeout() -
setRequestTimeout
public void setRequestTimeout(long requestTimeout) -
getMessageSelector
-
setMessageSelector
-
isTransacted
public boolean isTransacted() -
setTransacted
public void setTransacted(boolean transacted) -
getReplyTo
-
setReplyTo
-
getReplyToType
-
setReplyToType
-
isTestConnectionOnStartup
public boolean isTestConnectionOnStartup() -
setTestConnectionOnStartup
public void setTestConnectionOnStartup(boolean testConnectionOnStartup) -
setAsyncStartListener
public void setAsyncStartListener(boolean asyncStartListener) -
setAsyncStopListener
public void setAsyncStopListener(boolean asyncStopListener) -
isAsyncStartListener
public boolean isAsyncStartListener() -
isAsyncStopListener
public boolean isAsyncStopListener() -
isAutoStartup
public boolean isAutoStartup() -
setAutoStartup
public void setAutoStartup(boolean autoStartup) -
getDestinationCreationStrategy
-
setDestinationCreationStrategy
-
isReplyToSameDestinationAllowed
public boolean isReplyToSameDestinationAllowed() -
setReplyToSameDestinationAllowed
public void setReplyToSameDestinationAllowed(boolean replyToSameDestinationAllowed) -
isAllowNullBody
public boolean isAllowNullBody() -
setAllowNullBody
public void setAllowNullBody(boolean allowNullBody) -
isMapJmsMessage
public boolean isMapJmsMessage() -
setMapJmsMessage
public void setMapJmsMessage(boolean mapJmsMessage) -
getMessageCreatedStrategy
-
setMessageCreatedStrategy
-
getJmsKeyFormatStrategy
-
setJmsKeyFormatStrategy
-
getConnectionFactory
public jakarta.jms.ConnectionFactory getConnectionFactory() -
setConnectionFactory
public void setConnectionFactory(jakarta.jms.ConnectionFactory connectionFactory) -
getExceptionListener
public jakarta.jms.ExceptionListener getExceptionListener() -
setExceptionListener
public void setExceptionListener(jakarta.jms.ExceptionListener exceptionListener) -
getJmsObjectFactory
-
setJmsObjectFactory
-
isTransferException
public boolean isTransferException() -
setTransferException
public void setTransferException(boolean transferException) -
isDisableTimeToLive
public boolean isDisableTimeToLive() -
setDisableTimeToLive
public void setDisableTimeToLive(boolean disableTimeToLive) -
getRecoveryInterval
public long getRecoveryInterval() -
setRecoveryInterval
public void setRecoveryInterval(long recoveryInterval) -
isAsyncConsumer
public boolean isAsyncConsumer() -
setAsyncConsumer
public void setAsyncConsumer(boolean asyncConsumer) -
isSynchronous
public boolean isSynchronous() -
setSynchronous
public void setSynchronous(boolean synchronous)
-