Home » JBoss-5.1.0 » org » jboss » mq » sm » [javadoc | source]
abstract public class: AbstractStateManager [javadoc | source]

All Implemented Interfaces:
    StateManager, AbstractStateManagerMBean, KernelControllerContextAware, ServiceMBean, MBeanRegistration, NotificationEmitter

Direct Known Subclasses:
    JDBCStateManager, JDBCStateManager, DynamicStateManager, NullStateManager

An abstract baseclass to make it a little bit easier to implement new StateManagers.

Apart from one methods in StateManager subclasses implement the protected abstract callback methods to do its work.

Nested Class Summary:
protected class  AbstractStateManager.DurableSubscription  Abstracts the data between a subclass and this class. A sublcass can extends this class to ad custom behaviour. 
Fields inherited from org.jboss.system.ServiceMBeanSupport:
SERVICE_CONTROLLER_SIG,  log,  server,  serviceName
 public AbstractStateManager() 
Method from org.jboss.mq.sm.AbstractStateManager Summary:
addLoggedOnClientId,   checkLoggedOnClientId,   checkUser,   getDurableSubscription,   getDurableSubscriptionIdsForTopic,   getDurableTopic,   getPreconfClientId,   removeDurableSubscription,   removeLoggedOnClientId,   saveDurableSubscription,   setDurableSubscription
Methods from org.jboss.system.ServiceMBeanSupport:
create,   createService,   destroy,   destroyService,   getDeploymentInfo,   getLog,   getName,   getNextNotificationSequenceNumber,   getObjectName,   getServer,   getServiceName,   getState,   getStateString,   jbossInternalCreate,   jbossInternalDescription,   jbossInternalDestroy,   jbossInternalLifecycle,   jbossInternalStart,   jbossInternalStop,   pojoChange,   pojoCreate,   pojoDestroy,   pojoStart,   pojoStop,   postDeregister,   postRegister,   preDeregister,   preRegister,   setKernelControllerContext,   start,   startService,   stop,   stopService,   unsetKernelControllerContext
Methods from org.jboss.mx.util.JBossNotificationBroadcasterSupport:
addNotificationListener,   getNotificationInfo,   handleNotification,   nextNotificationSequenceNumber,   removeNotificationListener,   removeNotificationListener,   sendNotification
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.mq.sm.AbstractStateManager Detail:
 public  void addLoggedOnClientId(String ID) throws JMSException 
 abstract protected  void checkLoggedOnClientId(String clientID) throws JMSException
    Check if the clientID is allowed to logg in from the particular state managers perspective.
 public String checkUser(String login,
    String passwd) throws JMSException 
 abstract protected DurableSubscription getDurableSubscription(DurableSubscriptionID sub) throws JMSException
    Get a DurableSubscription.
 abstract public Collection getDurableSubscriptionIdsForTopic(SpyTopic topic) throws JMSException
 public SpyTopic getDurableTopic(DurableSubscriptionID sub) throws JMSException 
 abstract protected String getPreconfClientId(String login,
    String passwd) throws JMSException
    Get preconfigured clientID for login/user, and if state manager wants do authentication. This is NOT recomended when using a SecurityManager.
 abstract protected  void removeDurableSubscription(DurableSubscription ds) throws JMSException
    Remove the subscription and save to persistent storage.

    Called by this class so the sublclass can remove.

 public  void removeLoggedOnClientId(String ID) 
 abstract protected  void saveDurableSubscription(DurableSubscription ds) throws JMSException
    Add to durable subs and save the subsrcription to persistent storage.

    Called by this class so the sublclass can save. This may be both a new subscription or a changed one. It is up to the sublcass to know how to find a changed on. (Only the topic will have changed, and it is the same DurableSubscription that is saved again that this class got through getDurableSubscription.

 public  void setDurableSubscription(JMSDestinationManager server,
    DurableSubscriptionID sub,
    SpyTopic topic) throws JMSException