APIdia Launch Partner
Top Description Fields Constructors Methods
javax.management

public Class MBeanTrustPermission

extends BasicPermission
Class Inheritance
Annotations
@Deprecated
since:25
forRemoval:true
Imports
java.security.BasicPermission, java.io.IOException, .InvalidObjectException, .ObjectInputStream

Deprecated

for removal since 25.

This class was only useful in conjunction with the Security Manager, which is no longer supported. There is no replacement for this class.

This permission represents "trust" in a signer or codebase.

MBeanTrustPermission contains a target name but no actions list. A single target name, "register", is defined for this permission. The target "*" is also allowed, permitting "register" and any future targets that may be defined. Only the null value or the empty string are allowed for the action to allow the policy object to create the permissions specified in the policy file.

API Note

This permission cannot be used for controlling access to resources as the Security Manager is no longer supported. Consequently this class is deprecated for removal in a future release.

Since
1.5

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
MBeanTrustPermission(String
the name of the permission. It must be "register" or "*" for this permission.
name
)

Create a new MBeanTrustPermission with the given name.

public
MBeanTrustPermission(String
the name of the permission. It must be "register" or "*" for this permission.
name
,
String
the actions for the permission. It must be null or "".
actions
)

Create a new MBeanTrustPermission with the given name.

Method Summary

Modifier and TypeMethod and Description
private void
readObject(ObjectInputStream in)

Hides java.security.BasicPermission.readObject.

readObject is called to restore the state of the BasicPermission from a stream.

private static void
validate(String name, String actions)

Inherited from java.security.BasicPermission:
equalsgetActionshashCodeimpliesnewPermissionCollection

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.BasicPermission.serialVersionUID.

Constructor Detail

MBeanTrustPermissionback to summary
public MBeanTrustPermission(String name)

Create a new MBeanTrustPermission with the given name.

This constructor is equivalent to MBeanTrustPermission(name,null).

Parameters
name:String

the name of the permission. It must be "register" or "*" for this permission.

Exceptions
NullPointerException:
if name is null.
IllegalArgumentException:
if name is neither "register" nor "*".
MBeanTrustPermissionback to summary
public MBeanTrustPermission(String name, String actions)

Create a new MBeanTrustPermission with the given name.

Parameters
name:String

the name of the permission. It must be "register" or "*" for this permission.

actions:String

the actions for the permission. It must be null or "".

Exceptions
NullPointerException:
if name is null.
IllegalArgumentException:
if name is neither "register" nor "*"; or if actions is a non-null non-empty string.

Method Detail

readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException

Hides java.security.BasicPermission.readObject.

Doc from java.security.BasicPermission.readObject.

readObject is called to restore the state of the BasicPermission from a stream.

Exceptions
IOException:
if an I/O error occurs
ClassNotFoundException:
if a serialized class cannot be loaded
validateback to summary
private static void validate(String name, String actions)