|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport (src) org.jboss.system.ServiceMBeanSupport (src) 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 (src)
Abstracts the data between a subclass and this class. |
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 | |
AbstractStateManager()
Create a new abstract state manager |
Method Summary | |
void |
addLoggedOnClientId(java.lang.String ID)
Ad a logged in clientID to the statemanager. |
protected abstract void |
checkLoggedOnClientId(java.lang.String clientID)
Check if the clientID is allowed to logg in from the particular state managers perspective. |
java.lang.String |
checkUser(java.lang.String login,
java.lang.String passwd)
Check if a user has a preconfigured clientID and return it. |
protected abstract AbstractStateManager.DurableSubscription (src) |
getDurableSubscription(DurableSubscriptionID (src) sub)
Get a DurableSubscription. |
abstract 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. |
protected abstract java.lang.String |
getPreconfClientId(java.lang.String login,
java.lang.String passwd)
Get preconfigured clientID for login/user, and if state manager wants do authentication. |
protected abstract void |
removeDurableSubscription(AbstractStateManager.DurableSubscription (src) ds)
Remove the subscription and save to persistent storage. |
void |
removeLoggedOnClientId(java.lang.String ID)
Remove the logged in clientID. |
protected abstract void |
saveDurableSubscription(AbstractStateManager.DurableSubscription (src) ds)
Add to durable subs and save the subsrcription to persistent storage. |
void |
setDurableSubscription(JMSDestinationManager (src) server,
DurableSubscriptionID (src) sub,
SpyTopic (src) topic)
Ad, change or delete a durable subsciption. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
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 (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 |
Methods inherited from interface org.jboss.mq.sm.AbstractStateManagerMBean (src) |
getInstance |
Methods inherited from interface org.jboss.system.ServiceMBean (src) |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service (src) |
create, destroy, start, stop |
Constructor Detail |
public AbstractStateManager()
Method Detail |
public void setDurableSubscription(JMSDestinationManager (src) server, DurableSubscriptionID (src) sub, SpyTopic (src) topic) throws JMSException (src)
StateManager (src)
setDurableSubscription
in interface StateManager (src)
server
- The JMSServersub
- The id of the durable subscriptiontopic
- The topic to subscribe durable on, if null
the subscription will be removed.
JMSException (src)
- Description of Exceptionpublic SpyTopic (src) getDurableTopic(DurableSubscriptionID (src) sub) throws JMSException (src)
StateManager (src)
getDurableTopic
in interface StateManager (src)
JMSException (src)
public java.lang.String checkUser(java.lang.String login, java.lang.String passwd) throws JMSException (src)
StateManager (src)
checkUser
in interface StateManager (src)
login
- user namepasswd
- password
JMSException (src)
- if the userpublic void addLoggedOnClientId(java.lang.String ID) throws JMSException (src)
StateManager (src)
addLoggedOnClientId
in interface StateManager (src)
ID
- a clientID
JMSException (src)
- Description of Exceptionpublic void removeLoggedOnClientId(java.lang.String ID)
StateManager (src)
removeLoggedOnClientId
in interface StateManager (src)
ID
- clientID.public abstract java.util.Collection getDurableSubscriptionIdsForTopic(SpyTopic (src) topic) throws JMSException (src)
StateManager (src)
getDurableSubscriptionIdsForTopic
in interface StateManager (src)
topic
- the topic.
JMSException (src)
- Description of Exceptionprotected abstract java.lang.String getPreconfClientId(java.lang.String login, java.lang.String passwd) throws JMSException (src)
login
- the user namepasswd
- the password
JMSException (src)
- for any errorprotected abstract void checkLoggedOnClientId(java.lang.String clientID) throws JMSException (src)
clientID
- the client id to check
JMSException (src)
- for any errorprotected abstract AbstractStateManager.DurableSubscription (src) getDurableSubscription(DurableSubscriptionID (src) sub) throws JMSException (src)
sub
- the durable subscription id
JMSException (src)
- for any errorprotected abstract void saveDurableSubscription(AbstractStateManager.DurableSubscription (src) ds) throws JMSException (src)
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
JMSException (src)
- for any errorprotected abstract void removeDurableSubscription(AbstractStateManager.DurableSubscription (src) ds) throws JMSException (src)
Called by this class so the sublclass can remove.
ds
- the durable subscription to save
JMSException (src)
- for any error
|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |