Java Doc for DynamicStateManager.java in  » EJB-Server-JBoss-4.2.1 » messaging » org » jboss » mq » sm » file » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » messaging » org.jboss.mq.sm.file 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jboss.mq.sm.AbstractStateManager
   org.jboss.mq.sm.file.DynamicStateManager

DynamicStateManager
public class DynamicStateManager extends AbstractStateManager implements DynamicStateManagerMBean(Code)
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:

<StateManager> <Users> <User> <Name>john</Name> <Password>needle</Password> <Id>DurableSubscriberExample</Id><!-- optional --> </User> </Users> <Roles> <Role name="guest"> <UserName>john</UserName> </Role> </Roles> <DurableSubscriptions> <DurableSubscription> <ClientID>needle</ClientID> <Name>myDurableSub</Name> <TopicName>TestTopic...</TopicName> </DurableSubscription> </DurableSubscriptions> </StateManager>
author:
   Norbert Lataille
author:
   Hiram Chirino
author:
   Peter Antman
version:
   $Revision: 57198 $

Inner Class :class DynamicDurableSubscription extends DurableSubscription

Field Summary
 booleanhasSecurityManager
     Do we have a security manager.
 XElementstateConfig
    

Constructor Summary
public  DynamicStateManager()
    

Method Summary
public  voidaddRole(String name)
    
public  voidaddUser(String name, String password, String preconfID)
    
public  voidaddUserToRole(String roleName, String user)
    
protected  voidcheckLoggedOnClientId(String clientID)
     Check if the clientID belonges to a preconfigured user.
protected  voidcreateService()
    
public  StringdisplayStateConfig()
     Show the current configuration.
protected  XElementfindRole(String role)
    
protected  XElementfindUser(String user)
    
protected  XElementfindUserInRole(XElement role, String user)
    
protected  DurableSubscriptiongetDurableSubscription(DurableSubscriptionID sub)
     Search for a configurated durable subscription.
public  CollectiongetDurableSubscriptionIdsForTopic(SpyTopic topic)
    
public  StateManagergetInstance()
    
protected  StringgetPreconfClientId(String login, String passwd)
     Return preconfigured client id.
public  String[]getRoles(String user)
     We currently only support one Group type Roles.
public  StringgetStateFile()
     Get name of file.
public  booleanhasSecurityManager()
    
public  voidloadConfig()
    
protected  voidremoveDurableSubscription(DurableSubscription ds)
    
public  voidremoveRole(String name)
    
public  voidremoveUser(String name)
    
public  voidremoveUserFromRole(String roleName, String user)
    
public  voidsaveConfig()
    
protected  voidsaveDurableSubscription(DurableSubscription ds)
    
public  voidsetHasSecurityManager(boolean hasSecurityManager)
    
public  voidsetStateFile(String newStateFile)
     Set the name of the statefile.
public  voidstartService()
    
public  booleanvalidatePassword(String user, String inputPassword)
     Validate the user/password combination.

Field Detail
hasSecurityManager
boolean hasSecurityManager(Code)
Do we have a security manager. By setting this to false, we may emulate the old behaviour of the state manager and let it autenticate connections.



stateConfig
XElement stateConfig(Code)




Constructor Detail
DynamicStateManager
public DynamicStateManager()(Code)




Method Detail
addRole
public void addRole(String name) throws Exception(Code)



addUser
public void addUser(String name, String password, String preconfID) throws Exception(Code)



addUserToRole
public void addUserToRole(String roleName, String user) throws Exception(Code)



checkLoggedOnClientId
protected void checkLoggedOnClientId(String clientID) throws JMSException(Code)
Check if the clientID belonges to a preconfigured user. If this is the case, a InvalidClientIDException will be raised.



createService
protected void createService() throws Exception(Code)



displayStateConfig
public String displayStateConfig() throws Exception(Code)
Show the current configuration.



findRole
protected XElement findRole(String role) throws Exception(Code)



findUser
protected XElement findUser(String user) throws Exception(Code)



findUserInRole
protected XElement findUserInRole(XElement role, String user) throws Exception(Code)



getDurableSubscription
protected DurableSubscription getDurableSubscription(DurableSubscriptionID sub) throws JMSException(Code)
Search for a configurated durable subscription.



getDurableSubscriptionIdsForTopic
public Collection getDurableSubscriptionIdsForTopic(SpyTopic topic) throws JMSException(Code)



getInstance
public StateManager getInstance()(Code)



getPreconfClientId
protected String getPreconfClientId(String login, String passwd) throws JMSException(Code)
Return preconfigured client id. Only if hasSecurityManager is false will a password be required to get the clientID and will the method throw a JMSSecurityException if the clientID was not found.



getRoles
public String[] getRoles(String user) throws Exception(Code)
We currently only support one Group type Roles. The role named returned should typically be put into a Roles Group principal.



getStateFile
public String getStateFile()(Code)
Get name of file. java.lang.String



hasSecurityManager
public boolean hasSecurityManager()(Code)



loadConfig
public void loadConfig() throws IOException, XElementException(Code)



removeDurableSubscription
protected void removeDurableSubscription(DurableSubscription ds) throws JMSException(Code)



removeRole
public void removeRole(String name) throws Exception(Code)



removeUser
public void removeUser(String name) throws Exception(Code)



removeUserFromRole
public void removeUserFromRole(String roleName, String user) throws Exception(Code)



saveConfig
public void saveConfig() throws IOException(Code)



saveDurableSubscription
protected void saveDurableSubscription(DurableSubscription ds) throws JMSException(Code)



setHasSecurityManager
public void setHasSecurityManager(boolean hasSecurityManager)(Code)



setStateFile
public void setStateFile(String newStateFile)(Code)
Set the name of the statefile.
Parameters:
  newStateFile - java.lang.String



startService
public void startService() throws Exception(Code)



validatePassword
public boolean validatePassword(String user, String inputPassword) throws Exception(Code)
Validate the user/password combination. A null inputPassword will allways reurn false.



Methods inherited from org.jboss.mq.sm.AbstractStateManager
public void addLoggedOnClientId(String ID) throws JMSException(Code)(Java Doc)
abstract protected void checkLoggedOnClientId(String clientID) throws JMSException(Code)(Java Doc)
public String checkUser(String login, String passwd) throws JMSException(Code)(Java Doc)
abstract protected DurableSubscription getDurableSubscription(DurableSubscriptionID sub) throws JMSException(Code)(Java Doc)
abstract public Collection getDurableSubscriptionIdsForTopic(SpyTopic topic) throws JMSException(Code)(Java Doc)
public SpyTopic getDurableTopic(DurableSubscriptionID sub) throws JMSException(Code)(Java Doc)
abstract protected String getPreconfClientId(String login, String passwd) throws JMSException(Code)(Java Doc)
abstract protected void removeDurableSubscription(DurableSubscription ds) throws JMSException(Code)(Java Doc)
public void removeLoggedOnClientId(String ID)(Code)(Java Doc)
abstract protected void saveDurableSubscription(DurableSubscription ds) throws JMSException(Code)(Java Doc)
public void setDurableSubscription(JMSDestinationManager server, DurableSubscriptionID sub, SpyTopic topic) throws JMSException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.