Java Doc for MBeanPermission.java in  » JMX » jfoxmx » javax » management » 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 » JMX » jfoxmx » javax.management 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.security.Permission
      javax.management.MBeanPermission

MBeanPermission
public class MBeanPermission extends Permission (Code)

Permission controlling access to MBeanServer operations. If a security manager has been set using System.setSecurityManager , most operations on the MBean Server require that the caller's permissions imply an MBeanPermission appropriate for the operation. This is described in detail in the documentation for the MBeanServer interface.

As with other Permission objects, an MBeanPermission can represent either a permission that you have or a permission that you need. When a sensitive operation is being checked for permission, an MBeanPermission is constructed representing the permission you need. The operation is only allowed if the permissions you have MBeanPermission.implies imply the permission you need.

An MBeanPermission contains four items of information:

  • The action. For a permission you need, this is one of the action in the list below. For a permission you have, this is a comma-separated list of those action, or *, representing all action.

    The action is returned by MBeanPermission.getActions() .

  • The class name.

    For a permission you need, this is the class name of an MBean you are accessing, as returned by MBeanServer.getMBeanInfo(ObjectName)MBeanServer.getMBeanInfo(name) . MBeanInfo.getClassNamegetClassName() . Certain operations do not reference a class name, in which case the class name is null.

    For a permission you have, this is either empty or a class name pattern. A class name pattern is a string following the Java conventions for dot-separated class names. It may end with ".*" meaning that the permission grants access to any class that begins with the string preceding ".*". For instance, "javax.management.*" grants access to javax.management.MBeanServerDelegate and javax.management.timer.Timer, among other classes.

    A class name pattern can also be empty or the single character "*", both of which grant access to any class.

  • The member.

    For a permission you need, this is the name of the attribute or operation you are accessing. For operations that do not reference an attribute or operation, the member is null.

    For a permission you have, this is either the name of an attribute or operation you can access, or it is empty or the single character "*", both of which grant access to any member.

  • The object name.

    For a permission you need, this is the ObjectName of the MBean you are accessing. For operations that do not reference a single MBean, it is null. It is never an object name pattern.

    For a permission you have, this is the ObjectName of the MBean or MBeans you can access. It may be an object name pattern to grant access to all MBeans whose names match the pattern. It may also be empty, which grants access to all MBeans whatever their name.

If you have an MBeanPermission, it allows operations only if all four of the items match.

The class name, member, and object name can be written together as a single string, which is the name of this permission. The name of the permission is the string returned by Permission.getNameSpace getNameSpace() . The format of the string is:

className#member[objectName]

The object name is written using the usual syntax for ObjectName . It may contain any legal characters, including ]. It is terminated by a ] character that is the last character in the string.

One or more of the className, member, or objectName may be omitted. If the member is omitted, the # may be too (but does not have to be). If the objectName is omitted, the [] may be too (but does not have to be). It is not legal to omit all three items, that is to have a name that is the empty string.

One or more of the className, member, or objectName may be the character "-", which is equivalent to a null value. A null value is implied by any value (including another null value) but does not imply any other value.

The possible action are these:

  • addNotificationListener
  • getAttribute
  • getClassLoader
  • getClassLoaderFor
  • getClassLoaderRepository
  • getDomains
  • getMBeanInfo
  • getObjectInstance
  • instantiate
  • invoke
  • isInstanceOf
  • queryMBeans
  • queryNames
  • registerMBean
  • removeNotificationListener
  • setAttribute
  • unregisterMBean

In a comma-separated list of action, spaces are allowed before and after each action.


since:
   JMX 1.2
author:
   Young Yang


Field Summary
final public static  StringAddNotificationListener
    
final public static  StringGetAttribute
    
final public static  StringGetClassLoader
    
final public static  StringGetClassLoaderFor
    
final public static  StringGetClassLoaderRepository
    
final public static  StringGetDomains
    
final public static  StringGetMBeanInfo
    
final public static  StringGetObjectInstance
    
final public static  StringInstantiate
    
final public static  StringInvoke
    
final public static  StringIsInstanceOf
    
final public static  StringQueryMBeans
    
final public static  StringQueryNames
    
final public static  StringRegisterMBean
    
final public static  StringRemoveNotificationListener
    
final public static  StringSetAttribute
    
final public static  StringUnregisterMBean
    

Constructor Summary
public  MBeanPermission(String name, String action)
    

Create a new MBeanPermission object with the specified target name and action.

The target name is of the form "className#member[objectName]" where each part is optional.

public  MBeanPermission(String className, String member, ObjectName objectName, String action)
    

Create a new MBeanPermission object with the specified target name (class name, member, object name) and action.

The class name, member and object name parameters define a target name of the form "className#member[objectName]" where each part is optional.


Method Summary
public  booleanequals(Object obj)
     Checks two MBeanPermission objects for equality.
public  StringgetActions()
    
public  inthashCode()
     Returns the hash code value for this object.
public  booleanimplies(Permission p)
    
public static  voidmain(String[] args)
    

Field Detail
AddNotificationListener
final public static String AddNotificationListener(Code)



GetAttribute
final public static String GetAttribute(Code)



GetClassLoader
final public static String GetClassLoader(Code)



GetClassLoaderFor
final public static String GetClassLoaderFor(Code)



GetClassLoaderRepository
final public static String GetClassLoaderRepository(Code)



GetDomains
final public static String GetDomains(Code)



GetMBeanInfo
final public static String GetMBeanInfo(Code)



GetObjectInstance
final public static String GetObjectInstance(Code)



Instantiate
final public static String Instantiate(Code)



Invoke
final public static String Invoke(Code)



IsInstanceOf
final public static String IsInstanceOf(Code)



QueryMBeans
final public static String QueryMBeans(Code)



QueryNames
final public static String QueryNames(Code)



RegisterMBean
final public static String RegisterMBean(Code)



RemoveNotificationListener
final public static String RemoveNotificationListener(Code)



SetAttribute
final public static String SetAttribute(Code)



UnregisterMBean
final public static String UnregisterMBean(Code)




Constructor Detail
MBeanPermission
public MBeanPermission(String name, String action)(Code)

Create a new MBeanPermission object with the specified target name and action.

The target name is of the form "className#member[objectName]" where each part is optional. It must not be empty or null.

The action parameter contains a comma-separated list of the desired action granted on the target name. It must not be empty or null.


Parameters:
  name - the triplet "className#member[objectName]".
Parameters:
  action - the action string.
exception:
  IllegalArgumentException - if the name oraction is invalid.



MBeanPermission
public MBeanPermission(String className, String member, ObjectName objectName, String action)(Code)

Create a new MBeanPermission object with the specified target name (class name, member, object name) and action.

The class name, member and object name parameters define a target name of the form "className#member[objectName]" where each part is optional. This will be the result of MBeanPermission.getName() on the resultant MBeanPermission.

The action parameter contains a comma-separated list of the desired action granted on the target name. It must not be empty or null.


Parameters:
  className - the class name to which this permission applies.May be null or "-", which represents a class namethat is implied by any class name but does not imply any otherclass name.
Parameters:
  member - the member to which this permission applies. Maybe null or "-", which represents a member that isimplied by any member but does not imply any other member.
Parameters:
  objectName - the object name to which this permissionapplies. May be null, which represents an object name that isimplied by any object name but does not imply any other objectname.
Parameters:
  action - the action string.




Method Detail
equals
public boolean equals(Object obj)(Code)
Checks two MBeanPermission objects for equality. Checks that obj is an MBeanPermission, and has the same name and actions as this object.


Parameters:
  obj - the object we are testing for equality with this object. true if obj is an MBeanPermission, and has thesame name and actions as this MBeanPermission object.




getActions
public String getActions()(Code)



hashCode
public int hashCode()(Code)
Returns the hash code value for this object. a hash code value for this object.



implies
public boolean implies(Permission p)(Code)



main
public static void main(String[] args)(Code)



Methods inherited from java.security.Permission
public void checkGuard(Object object) throws SecurityException(Code)(Java Doc)
abstract public boolean equals(Object obj)(Code)(Java Doc)
abstract public String getActions()(Code)(Java Doc)
final public String getName()(Code)(Java Doc)
abstract public int hashCode()(Code)(Java Doc)
abstract public boolean implies(Permission permission)(Code)(Java Doc)
public PermissionCollection newPermissionCollection()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.