toolbox.services.jms.simple
Class SimpleConsumerServiceImpl

Package class diagram package SimpleConsumerServiceImpl
java.lang.Object
  extended by toolbox.services.BaseService
      extended by toolbox.services.jms.JmsService
          extended by toolbox.services.jms.simple.SimpleConsumerServiceImpl
All Implemented Interfaces:
SimpleConsumerService, Service

public class SimpleConsumerServiceImpl
extends JmsService
implements SimpleConsumerService

Default implementation of the SimpleConsumerService interface.

This implementation can be configured into a Toolbox ServiceRegistry instance. See the doc/samples/jms/client directroy for examples.


Constructor Summary
SimpleConsumerServiceImpl()
          Default constructor
 
Method Summary
 void setDefaultMessageListener(javax.jms.MessageListener listener)
          Injection point for a custom MessageListener implementation.
 void start(java.lang.String consumer)
          Start the named consumer.
 void stop(java.lang.String consumer)
          Stop the named consumer.
 
Methods inherited from class toolbox.services.jms.JmsService
create, destroy, getJmsConsumer, getJmsProducer
 
Methods inherited from class toolbox.services.BaseService
getConfigHome, getName, getProperties, getProperty, getXMLProperties, logConfig, logFine, logFiner, logFinest, logInfo, logSevere, logWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleConsumerServiceImpl

public SimpleConsumerServiceImpl()
Default constructor

Method Detail

start

public void start(java.lang.String consumer)
           throws ServiceException
Start the named consumer.

Specified by:
start in interface SimpleConsumerService
Parameters:
consumer - String indicating the named consumer that must started.
Throws:
ServiceException - if the consumer cannot be started.

stop

public void stop(java.lang.String consumer)
          throws ServiceException
Stop the named consumer.

Specified by:
stop in interface SimpleConsumerService
Parameters:
consumer - String indicating the named consumer that must stopped.
Throws:
ServiceException - if the consumer cannot be stopped.

setDefaultMessageListener

public void setDefaultMessageListener(javax.jms.MessageListener listener)
Injection point for a custom MessageListener implementation.

Specified by:
setDefaultMessageListener in interface SimpleConsumerService
Parameters:
listener - Default MessageListener implementation to use.