toolbox.services.jms
Class JmsService

Package class diagram package JmsService
java.lang.Object
  extended by toolbox.services.BaseService
      extended by toolbox.services.jms.JmsService
All Implemented Interfaces:
Service
Direct Known Subclasses:
SimpleConsumerServiceImpl, SimpleProducerServiceImpl

public class JmsService
extends BaseService

Convenience service implementation that can be used to develop services that require interaction with a JMS Broker using the toolbox.jms package.


Constructor Summary
protected JmsService()
          Default constructor.
 
Method Summary
 void create(java.lang.String name, java.lang.String confHome, ServiceEnvironment env, XMLProperties xmlProps)
          Create the service by obtaining a reference to the JmsManager in the provided environment.
 void destroy()
          Destroy this service by destroying worker instance.
protected  JmsConsumer getJmsConsumer(java.lang.String name)
          Return the named JmsConsumer instance.
protected  JmsProducer getJmsProducer(java.lang.String name)
          Return the named JmsProducer instance.
 
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

JmsService

protected JmsService()
Default constructor.

Method Detail

create

public void create(java.lang.String name,
                   java.lang.String confHome,
                   ServiceEnvironment env,
                   XMLProperties xmlProps)
            throws ServiceException
Create the service by obtaining a reference to the JmsManager in the provided environment.

Specified by:
create in interface Service
Overrides:
create in class BaseService
Parameters:
name - The name of this service.
confHome - The path to the configuration home directory.
env - The service environment for this service.
xmlProps - XML configuration properties.
Throws:
ServiceException - if this service cannot be created.

getJmsProducer

protected JmsProducer getJmsProducer(java.lang.String name)
Return the named JmsProducer instance.

Parameters:
name - String containing the name of the producer to return.
Returns:
JmsProducer instance.

getJmsConsumer

protected JmsConsumer getJmsConsumer(java.lang.String name)
Return the named JmsConsumer instance.

Parameters:
name - String containing the name of the consumer to return.
Returns:
JmsConsumer instance.

destroy

public void destroy()
Destroy this service by destroying worker instance.

Specified by:
destroy in interface Service
Overrides:
destroy in class BaseService