|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.security.Permission
java.security.BasicPermission
javax.management.MBeanServerPermission
public class MBeanServerPermission
Represents the permissions required to perform
operations provided by the MBeanServerFactory.
As with all Permission objects, an
instance of this class either represents a permission
already held or one that is required to access a
particular service. In the case of MBeanServerPermissions,
implication checks are made using an instance of this class
when a user requests an operation from the factory, and a
SecurityManager is in place.
The permission is defined by its name, which may be
either a '*' (to allow all) or one or
more of the following, separated by a ',':
createMBeanServer -- allows a registered
instance of a server to be obtained from the factory.findMBeanServer -- allows all or one
particular server instance to be retrieved from the factory.newMBeanServer -- allows an unregistered
instance of a server to be obtained from the factory.releaseMBeanServer -- allows a reference to
a server instance to be removed from the factory.
The names may be surrounded by arbitrary amounts of whitespace.
createMBeanServer implies newMBeanServer.
| Constructor Summary | |
|---|---|
MBeanServerPermission(String name)
Constructs a new MBeanServerPermission with
the given name. |
|
MBeanServerPermission(String name,
String actions)
Constructs a new MBeanServerPermission with
the given name and actions. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Returns true if the given object is also an MBeanServerPermission
with the same name. |
int |
hashCode()
Returns a unique hash code for this permission. |
boolean |
implies(Permission p)
Returns true if this MBeanServerPermission implies
the given permission. |
PermissionCollection |
newPermissionCollection()
Returns a PermissionCollection which stores
a series of MBeanServerPermissions as the union
of their capabilities. |
| Methods inherited from class java.security.BasicPermission |
|---|
getActions |
| Methods inherited from class java.security.Permission |
|---|
checkGuard, getName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MBeanServerPermission(String name)
Constructs a new MBeanServerPermission with
the given name. The name must not be null
and must be equal to either "*" or a
comma-separated list of valid permissions. The four
valid constraints are:
createMBeanServerfindMBeanServernewMBeanServerreleaseMBeanServer
Calling this constructor is equivalent to calling
MBeanPermission(name, null).
name - the name of this permission.
NullPointerException - if name
is null.
IllegalArgumentException - if name
is not either equal to
"*" or forms
a comma-separated list of
valid constraints.MBeanServerPermission(String,String)
public MBeanServerPermission(String name,
String actions)
Constructs a new MBeanServerPermission with
the given name and actions. The actions are unused,
and must be either null or the empty
string. The name must not be null
and must be equal to either "*" or a
comma-separated list of valid permissions. The four
valid constraints are:
createMBeanServerfindMBeanServernewMBeanServerreleaseMBeanServer
Calling this constructor is equivalent to calling
MBeanPermission(name, null).
name - the name of this permission.
NullPointerException - if name
is null.
IllegalArgumentException - if name
is not either equal to
"*" or forms
a comma-separated list of
valid constraints, or if
actions is not
null or the
empty string.MBeanServerPermission(String,String)| Method Detail |
|---|
public boolean equals(Object obj)
MBeanServerPermission
with the same name.
equals in class BasicPermissionobj - the object to compare with this one.
MBeanPermission
with the same name.Object.hashCode()public int hashCode()
Permission.getName().
hashCode in class BasicPermissionObject.equals(Object),
System.identityHashCode(Object)public boolean implies(Permission p)
MBeanServerPermission implies
the given permission. This occurs if the given permission
is also an MBeanServerPermission and its target names
are a subset of the target names of this permission. Note that
the name createMBeanServer implies
newMBeanServer.
implies in class BasicPermissionp - the permission to check for implication.
p.public PermissionCollection newPermissionCollection()
PermissionCollection which stores
a series of MBeanServerPermissions as the union
of their capabilities.
newPermissionCollection in class BasicPermissionMBeanServerPermissions.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||