public class JmsConsumer
extends org.apache.camel.impl.DefaultConsumer
implements org.apache.camel.SuspendableService
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, toStringdoShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic JmsConsumer(JmsEndpoint endpoint, org.apache.camel.Processor processor, org.springframework.jms.listener.AbstractMessageListenerContainer listenerContainer)
public JmsEndpoint getEndpoint()
getEndpoint in interface org.apache.camel.EndpointAwaregetEndpoint in class org.apache.camel.impl.DefaultConsumerpublic org.springframework.jms.listener.AbstractMessageListenerContainer getListenerContainer()
throws Exception
Exceptionpublic EndpointMessageListener getEndpointMessageListener()
protected void createMessageListener(JmsEndpoint endpoint, org.apache.camel.Processor processor)
protected void createMessageListenerContainer()
throws Exception
Exceptionpublic 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.DefaultConsumerExceptionprotected void prepareAndStartListenerContainer()
protected void stopAndDestroyListenerContainer()
protected void doStop()
throws Exception
doStop in class org.apache.camel.impl.DefaultConsumerExceptionprotected void doSuspend()
throws Exception
doSuspend in class org.apache.camel.support.ServiceSupportExceptionApache Camel