|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
org.jboss.mq.sm.AbstractStateManager (src)
org.jboss.mq.sm.file.DynamicStateManager
A state manager that allowed durable subscriptions to be dynamically created if configured to support it. Otherwise backward compatible with the old StateManager.
Backed by an XML file.
Example file format:
Nested Class Summary |
Nested classes inherited from class org.jboss.mq.sm.AbstractStateManager (src) |
AbstractStateManager.DurableSubscription (src) |
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 | |
DynamicStateManager()
|
Method Summary | |
void |
addRole(java.lang.String name)
|
void |
addUser(java.lang.String name,
java.lang.String password,
java.lang.String preconfID)
|
void |
addUserToRole(java.lang.String roleName,
java.lang.String user)
|
protected void |
checkLoggedOnClientId(java.lang.String clientID)
Check if the clientID belonges to a preconfigured user. |
protected void |
createService()
Sub-classes should override this method to provide custum 'create' logic. |
java.lang.String |
displayStateConfig()
Show the current configuration. |
protected XElement (src) |
findRole(java.lang.String role)
|
protected XElement (src) |
findUser(java.lang.String user)
|
protected XElement (src) |
findUserInRole(XElement (src) role,
java.lang.String user)
|
protected AbstractStateManager.DurableSubscription (src) |
getDurableSubscription(DurableSubscriptionID (src) sub)
Search for a configurated durable subscription. |
java.util.Collection |
getDurableSubscriptionIdsForTopic(SpyTopic (src) topic)
Get all configured durable subscriptions for a particular topic. |
StateManager (src) |
getInstance()
Get an instance if the StateManager (Singleton). |
protected java.lang.String |
getPreconfClientId(java.lang.String login,
java.lang.String passwd)
Return preconfigured client id. |
java.lang.String[] |
getRoles(java.lang.String user)
We currently only support one Group type Roles. |
java.lang.String |
getStateFile()
Get name of file. |
boolean |
hasSecurityManager()
|
void |
loadConfig()
|
protected void |
removeDurableSubscription(AbstractStateManager.DurableSubscription (src) ds)
Remove the subscription and save to persistent storage. |
void |
removeRole(java.lang.String name)
|
void |
removeUser(java.lang.String name)
|
void |
removeUserFromRole(java.lang.String roleName,
java.lang.String user)
|
void |
saveConfig()
|
protected void |
saveDurableSubscription(AbstractStateManager.DurableSubscription (src) ds)
Add to durable subs and save the subsrcription to persistent storage. |
void |
setHasSecurityManager(boolean hasSecurityManager)
|
void |
setStateFile(java.lang.String newStateFile)
Set the name of the statefile. |
void |
startService()
Sub-classes should override this method to provide custum 'start' logic. |
boolean |
validatePassword(java.lang.String user,
java.lang.String inputPassword)
Validate the user/password combination. |
Methods inherited from class org.jboss.mq.sm.AbstractStateManager (src) |
addLoggedOnClientId, checkUser, getDurableTopic, removeLoggedOnClientId, setDurableSubscription |
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 |
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 DynamicStateManager()
Method Detail |
public StateManager (src) getInstance()
AbstractStateManagerMBean (src)
protected void createService() throws java.lang.Exception
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
createService
in class ServiceMBeanSupport (src)
java.lang.Exception
public void startService() throws java.lang.Exception
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
startService
in class ServiceMBeanSupport (src)
java.lang.Exception
public java.lang.String displayStateConfig() throws java.lang.Exception
java.lang.Exception
public void setStateFile(java.lang.String newStateFile)
newStateFile
- java.lang.Stringpublic java.lang.String getStateFile()
public boolean hasSecurityManager()
public void setHasSecurityManager(boolean hasSecurityManager)
public void loadConfig() throws java.io.IOException, XElementException (src)
java.io.IOException
XElementException (src)
public void saveConfig() throws java.io.IOException
java.io.IOException
protected java.lang.String getPreconfClientId(java.lang.String login, java.lang.String passwd) throws JMSException (src)
getPreconfClientId
in class AbstractStateManager (src)
login
- the user namepasswd
- the password
JMSException (src)
- for any errorprotected AbstractStateManager.DurableSubscription (src) getDurableSubscription(DurableSubscriptionID (src) sub) throws JMSException (src)
getDurableSubscription
in class AbstractStateManager (src)
sub
- the durable subscription id
JMSException (src)
- for any errorprotected void checkLoggedOnClientId(java.lang.String clientID) throws JMSException (src)
checkLoggedOnClientId
in class AbstractStateManager (src)
clientID
- the client id to check
JMSException (src)
- for any errorprotected void saveDurableSubscription(AbstractStateManager.DurableSubscription (src) ds) throws JMSException (src)
AbstractStateManager (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.
saveDurableSubscription
in class AbstractStateManager (src)
ds
- the durable subscription to save
JMSException (src)
- for any errorprotected void removeDurableSubscription(AbstractStateManager.DurableSubscription (src) ds) throws JMSException (src)
AbstractStateManager (src)
Called by this class so the sublclass can remove.
removeDurableSubscription
in class AbstractStateManager (src)
ds
- the durable subscription to save
JMSException (src)
- for any errorpublic java.util.Collection getDurableSubscriptionIdsForTopic(SpyTopic (src) topic) throws JMSException (src)
StateManager (src)
getDurableSubscriptionIdsForTopic
in interface StateManager (src)
getDurableSubscriptionIdsForTopic
in class AbstractStateManager (src)
JMSException (src)
public void addUser(java.lang.String name, java.lang.String password, java.lang.String preconfID) throws java.lang.Exception
java.lang.Exception
public void removeUser(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public void addRole(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public void removeRole(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public void addUserToRole(java.lang.String roleName, java.lang.String user) throws java.lang.Exception
java.lang.Exception
public void removeUserFromRole(java.lang.String roleName, java.lang.String user) throws java.lang.Exception
java.lang.Exception
protected XElement (src) findUser(java.lang.String user) throws java.lang.Exception
java.lang.Exception
protected XElement (src) findRole(java.lang.String role) throws java.lang.Exception
java.lang.Exception
protected XElement (src) findUserInRole(XElement (src) role, java.lang.String user) throws java.lang.Exception
java.lang.Exception
public java.lang.String[] getRoles(java.lang.String user) throws java.lang.Exception
java.lang.Exception
public boolean validatePassword(java.lang.String user, java.lang.String inputPassword) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |