org.jboss.mq.sm.file
Class OldStateManager

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.mq.sm.file.OldStateManager
All Implemented Interfaces:
MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src) , StateManager (src)

public class OldStateManager
extends ServiceMBeanSupport (src)
implements StateManager (src)

This class is a simple User Manager. It handles credential issues.

This is the old state manager.


Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
OldStateManager()
          Constructor for the StateManager object
 
Method Summary
 void addLoggedOnClientId(java.lang.String ID)
          Ad a logged in clientID to the statemanager.
 java.lang.String checkUser(java.lang.String login, java.lang.String passwd)
          #Description of the Method
protected  void createService()
          Sub-classes should override this method to provide custum 'create' logic.
 java.lang.String displayStateConfig()
           
 java.util.Collection getDurableSubscriptionIdsForTopic(SpyTopic (src)  topic)
          Get all configured durable subscriptions for a particular topic.
 SpyTopic (src) getDurableTopic(DurableSubscriptionID (src)  sub)
          Get the destination a subscription is for.
 StateManager (src) getInstance()
           
 java.lang.String getStateFile()
          Gets the StateFile attribute of the StateManagerMBean object
 void loadConfig()
           
 void removeLoggedOnClientId(java.lang.String ID)
          #Description of the Method
 void saveConfig()
           
 void setDurableSubscription(JMSDestinationManager (src)  server, DurableSubscriptionID (src)  sub, SpyTopic (src)  topic)
          Sets the DurableSubscription attribute of the StateManager object
 void setStateFile(java.lang.String newStateFile)
          Sets the StateFile attribute of the StateManagerMBean object
 void startService()
          #Description of the Method
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop, stopService
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OldStateManager

public OldStateManager()
                throws XElementException (src) 
Constructor for the StateManager object

Throws:
XElementException (src) - Description of Exception
Method Detail

createService

protected void createService()
                      throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'create' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
createService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

setStateFile

public void setStateFile(java.lang.String newStateFile)
Sets the StateFile attribute of the StateManagerMBean object

Parameters:
newStateFile - The new StateFile value

getInstance

public StateManager (src)  getInstance()

setDurableSubscription

public void setDurableSubscription(JMSDestinationManager (src)  server,
                                   DurableSubscriptionID (src)  sub,
                                   SpyTopic (src)  topic)
                            throws JMSException (src) 
Sets the DurableSubscription attribute of the StateManager object

Specified by:
setDurableSubscription in interface StateManager (src)
Parameters:
server - The new DurableSubscription value
sub - The new DurableSubscription value
topic - The new DurableSubscription value
Throws:
JMSException (src) - Description of Exception

getDurableTopic

public SpyTopic (src)  getDurableTopic(DurableSubscriptionID (src)  sub)
                         throws JMSException (src) 
Get the destination a subscription is for.

Specified by:
getDurableTopic in interface StateManager (src)
Throws:
JMSException (src)

getStateFile

public java.lang.String getStateFile()
Gets the StateFile attribute of the StateManagerMBean object

Returns:
The StateFile value

checkUser

public java.lang.String checkUser(java.lang.String login,
                                  java.lang.String passwd)
                           throws JMSException (src) 
#Description of the Method

Specified by:
checkUser in interface StateManager (src)
Parameters:
login - Description of Parameter
passwd - Description of Parameter
Returns:
Description of the Returned Value
Throws:
JMSException (src) - Description of Exception

addLoggedOnClientId

public void addLoggedOnClientId(java.lang.String ID)
                         throws JMSException (src) 
Ad a logged in clientID to the statemanager. The clientID must not be active, and it must not be password protected.

Specified by:
addLoggedOnClientId in interface StateManager (src)
Parameters:
ID - The feature to be added to the LoggedOnClientId attribute
Throws:
JMSException (src) - Description of Exception

removeLoggedOnClientId

public void removeLoggedOnClientId(java.lang.String ID)
#Description of the Method

Specified by:
removeLoggedOnClientId in interface StateManager (src)
Parameters:
ID - Description of Parameter

startService

public void startService()
                  throws java.lang.Exception
#Description of the Method

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception - Description of Exception

getDurableSubscriptionIdsForTopic

public java.util.Collection getDurableSubscriptionIdsForTopic(SpyTopic (src)  topic)
                                                       throws JMSException (src) 
Description copied from interface: StateManager (src)
Get all configured durable subscriptions for a particular topic.

Specified by:
getDurableSubscriptionIdsForTopic in interface StateManager (src)
Parameters:
topic - the topic.
Returns:
a collection of DurableSubscriptionID
Throws:
JMSException (src) - Description of Exception

loadConfig

public void loadConfig()
                throws java.io.IOException,
                       XElementException (src) 
Throws:
java.io.IOException
XElementException (src)

saveConfig

public void saveConfig()
                throws java.io.IOException
Throws:
java.io.IOException

displayStateConfig

public java.lang.String displayStateConfig()
                                    throws java.lang.Exception
Throws:
java.lang.Exception