org.exolab.jms.messagemgr
Class DestinationBinder

java.lang.Object
  |
  +--org.exolab.jms.service.Service
        |
        +--org.exolab.jms.messagemgr.DestinationBinder
All Implemented Interfaces:
DestinationEventListener, Serviceable

public class DestinationBinder
extends Service
implements DestinationEventListener

Binds persistent destinations in JNDI.

Version:
$Revision: 1.2 $ $Date: 2005/11/12 10:49:48 $
Author:
Tim Anderson

Constructor Summary
DestinationBinder(DestinationManager destinations, NameService names)
          Construct a new DestinationBinder.
 
Method Summary
 void cacheAdded(JmsDestination destination, DestinationCache cache)
          Invoked when a message cache is created.
 void cacheRemoved(JmsDestination destination, DestinationCache cache)
          Invoked when a message cache is removed.
 void destinationAdded(JmsDestination destination)
          Invoked when a destination is created.
 void destinationRemoved(JmsDestination destination)
          Invoked when a destination is removed.
protected  void doStart()
          Start the service.
protected  void doStop()
          Stop the service.
 
Methods inherited from class org.exolab.jms.service.Service
getName, isStarted, restart, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DestinationBinder

public DestinationBinder(DestinationManager destinations,
                         NameService names)
Construct a new DestinationBinder.
Parameters:
destinations - the destination manager
names - the name service
Method Detail

destinationAdded

public void destinationAdded(JmsDestination destination)
                      throws javax.jms.JMSException
Invoked when a destination is created.
Specified by:
destinationAdded in interface DestinationEventListener
Parameters:
destination - the destination that was added

destinationRemoved

public void destinationRemoved(JmsDestination destination)
Invoked when a destination is removed.
Specified by:
destinationRemoved in interface DestinationEventListener
Parameters:
destination - the destination that was removed

cacheAdded

public void cacheAdded(JmsDestination destination,
                       DestinationCache cache)
Invoked when a message cache is created.
Specified by:
cacheAdded in interface DestinationEventListener
Parameters:
destination - the destination that messages are being cached for
cache - the corresponding cache

cacheRemoved

public void cacheRemoved(JmsDestination destination,
                         DestinationCache cache)
Invoked when a message cache is removed.
Specified by:
cacheRemoved in interface DestinationEventListener
Parameters:
destination - the destination that messages are no longer being cached for
cache - the corresponding cache

doStart

protected void doStart()
                throws ServiceException
Start the service.
Overrides:
doStart in class Service
Throws:
ServiceException - if the service fails to start

doStop

protected void doStop()
               throws ServiceException
Stop the service.
Overrides:
doStop in class Service
Throws:
ServiceException - if the service fails to stop


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.