|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport org.jboss.mq.sm.AbstractStateManager
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. |
Field Summary |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
AbstractStateManager()
Create a new abstract state manager |
Method Summary | |
void |
addLoggedOnClientId(String ID)
Ad a logged in clientID to the statemanager. |
protected abstract void |
checkLoggedOnClientId(String clientID)
Check if the clientID is allowed to logg in from the particular state managers perspective. |
String |
checkUser(String login,
String passwd)
Check if a user has a preconfigured clientID and return it. |
protected abstract AbstractStateManager.DurableSubscription |
getDurableSubscription(DurableSubscriptionID sub)
Get a DurableSubscription. |
abstract Collection |
getDurableSubscriptionIdsForTopic(SpyTopic topic)
Get all configured durable subscriptions for a particular topic. |
SpyTopic |
getDurableTopic(DurableSubscriptionID sub)
Get the destination a subscription is for. |
protected abstract String |
getPreconfClientId(String login,
String passwd)
Get preconfigured clientID for login/user, and if state manager wants do authentication. |
protected abstract void |
removeDurableSubscription(AbstractStateManager.DurableSubscription ds)
Remove the subscription and save to persistent storage. |
void |
removeLoggedOnClientId(String ID)
Remove the logged in clientID. |
protected abstract void |
saveDurableSubscription(AbstractStateManager.DurableSubscription ds)
Add to durable subs and save the subsrcription to persistent storage. |
void |
setDurableSubscription(JMSDestinationManager server,
DurableSubscriptionID sub,
SpyTopic topic)
Ad, change or delete a durable subsciption. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, startService, stop, stopService |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.mq.sm.AbstractStateManagerMBean |
getInstance |
Methods inherited from interface org.jboss.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
Constructor Detail |
public AbstractStateManager()
Method Detail |
public void setDurableSubscription(JMSDestinationManager server, DurableSubscriptionID sub, SpyTopic topic) throws javax.jms.JMSException
StateManager
setDurableSubscription
in interface StateManager
server
- The JMSServersub
- The id of the durable subscriptiontopic
- The topic to subscribe durable on, if null
the subscription will be removed.
javax.jms.JMSException
- Description of Exceptionpublic SpyTopic getDurableTopic(DurableSubscriptionID sub) throws javax.jms.JMSException
StateManager
getDurableTopic
in interface StateManager
javax.jms.JMSException
public String checkUser(String login, String passwd) throws javax.jms.JMSException
StateManager
checkUser
in interface StateManager
login
- user namepasswd
- password
javax.jms.JMSException
- if the userpublic void addLoggedOnClientId(String ID) throws javax.jms.JMSException
StateManager
addLoggedOnClientId
in interface StateManager
ID
- a clientID
javax.jms.JMSException
- Description of Exceptionpublic void removeLoggedOnClientId(String ID)
StateManager
removeLoggedOnClientId
in interface StateManager
ID
- clientID.public abstract Collection getDurableSubscriptionIdsForTopic(SpyTopic topic) throws javax.jms.JMSException
StateManager
getDurableSubscriptionIdsForTopic
in interface StateManager
topic
- the topic.
javax.jms.JMSException
- Description of Exceptionprotected abstract String getPreconfClientId(String login, String passwd) throws javax.jms.JMSException
login
- the user namepasswd
- the password
javax.jms.JMSException
- for any errorprotected abstract void checkLoggedOnClientId(String clientID) throws javax.jms.JMSException
clientID
- the client id to check
javax.jms.JMSException
- for any errorprotected abstract AbstractStateManager.DurableSubscription getDurableSubscription(DurableSubscriptionID sub) throws javax.jms.JMSException
sub
- the durable subscription id
javax.jms.JMSException
- for any errorprotected abstract void saveDurableSubscription(AbstractStateManager.DurableSubscription ds) throws javax.jms.JMSException
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.
ds
- the durable subscription to save
javax.jms.JMSException
- for any errorprotected abstract void removeDurableSubscription(AbstractStateManager.DurableSubscription ds) throws javax.jms.JMSException
Called by this class so the sublclass can remove.
ds
- the durable subscription to save
javax.jms.JMSException
- for any error
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |