org.apache.camel.component.jms
Class JmsConsumer
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.impl.DefaultConsumer
org.apache.camel.component.jms.JmsConsumer
- All Implemented Interfaces:
- Consumer, Service, ShutdownableService, SuspendableService
public class JmsConsumer
- extends DefaultConsumer
- implements SuspendableService
A Consumer which uses Spring's AbstractMessageListenerContainer implementations to consume JMS messages
- Version:
- $Revision: 16521 $
| Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, shutdown, start, stop |
JmsConsumer
public JmsConsumer(JmsEndpoint endpoint,
Processor processor,
AbstractMessageListenerContainer listenerContainer)
getEndpoint
public JmsEndpoint getEndpoint()
- Specified by:
getEndpoint in interface Consumer- Overrides:
getEndpoint in class DefaultConsumer
getListenerContainer
public AbstractMessageListenerContainer getListenerContainer()
getEndpointMessageListener
public EndpointMessageListener getEndpointMessageListener()
createMessageListener
protected void createMessageListener(JmsEndpoint endpoint,
Processor processor)
createMessageListenerContainer
protected void createMessageListenerContainer()
startListenerContainer
public void startListenerContainer()
- Starts the JMS listener container
Can be used to start this consumer later if it was configured to not auto startup.
testConnectionOnStartup
protected void testConnectionOnStartup()
throws FailedToCreateConsumerException
- Pre tests the connection before starting the listening.
In case of connection failure the exception is thrown which prevents Camel from starting.
- Throws:
FailedToCreateConsumerException - is thrown if testing the connection failed
doStart
protected void doStart()
throws Exception
- Overrides:
doStart in class DefaultConsumer
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Overrides:
doStop in class DefaultConsumer
- Throws:
Exception
suspend
public void suspend()
- Specified by:
suspend in interface SuspendableService
resume
public void resume()
- Specified by:
resume in interface SuspendableService
isSuspended
public boolean isSuspended()
- Specified by:
isSuspended in interface SuspendableService
Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.