public class JmsConsumer
extends org.apache.camel.impl.DefaultConsumer
implements org.apache.camel.Suspendable
Consumer
which uses Spring's AbstractMessageListenerContainer
implementations
to consume JMS messages.DefaultJmsMessageListenerContainer
,
SimpleJmsMessageListenerContainer
Constructor and Description |
---|
JmsConsumer(JmsEndpoint endpoint,
org.apache.camel.Processor processor,
org.springframework.jms.listener.AbstractMessageListenerContainer listenerContainer) |
Modifier and Type | Method and Description |
---|---|
protected void |
createMessageListener(JmsEndpoint endpoint,
org.apache.camel.Processor processor) |
protected void |
createMessageListenerContainer() |
protected void |
doResume() |
protected void |
doStart() |
protected void |
doStop() |
protected void |
doSuspend() |
JmsEndpoint |
getEndpoint() |
EndpointMessageListener |
getEndpointMessageListener() |
org.springframework.jms.listener.AbstractMessageListenerContainer |
getListenerContainer() |
protected void |
prepareAndStartListenerContainer() |
void |
startListenerContainer()
Starts the JMS listener container
Can be used to start this consumer later if it was configured to not auto startup.
|
protected void |
stopAndDestroyListenerContainer() |
protected void |
testConnectionOnStartup()
Pre tests the connection before starting the listening.
|
createUoW, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, handleException, handleException, setExceptionHandler, setRoute, toString
doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public JmsConsumer(JmsEndpoint endpoint, org.apache.camel.Processor processor, org.springframework.jms.listener.AbstractMessageListenerContainer listenerContainer)
public JmsEndpoint getEndpoint()
getEndpoint
in interface org.apache.camel.EndpointAware
getEndpoint
in class org.apache.camel.impl.DefaultConsumer
public org.springframework.jms.listener.AbstractMessageListenerContainer getListenerContainer() throws Exception
Exception
public EndpointMessageListener getEndpointMessageListener()
protected void createMessageListener(JmsEndpoint endpoint, org.apache.camel.Processor processor)
protected void createMessageListenerContainer() throws Exception
Exception
public void startListenerContainer()
protected void testConnectionOnStartup() throws org.apache.camel.FailedToCreateConsumerException
org.apache.camel.FailedToCreateConsumerException
- is thrown if testing the connection failedprotected void doStart() throws Exception
doStart
in class org.apache.camel.impl.DefaultConsumer
Exception
protected void prepareAndStartListenerContainer()
protected void stopAndDestroyListenerContainer()
protected void doStop() throws Exception
doStop
in class org.apache.camel.impl.DefaultConsumer
Exception
protected void doSuspend() throws Exception
doSuspend
in class org.apache.camel.support.ServiceSupport
Exception
Apache Camel