public class WatchdogTimerPermission extends PeripheralPermission
WatchdogTimerPermission class defines permissions for watchdog timer access.
A WatchdogTimerPermission permission has a target name and a list of actions.
The target name contains hardware addressing information. The format is the one defined for the base PeripheralPermission class
with the following addition:
{channel-spec}{channel-spec} string (described in PeripheralPermission) is
the decimal string representation of a watchdog timer number as may be returned by a call to
WatchdogTimerConfig.getTimerNumber(). The characters in the string must all be decimal digits.
open and powermanage. Their meaning is defined as follows:
openPeripheralManager.open)powermanagePowerManaged)PeripheralManager.open,
PowerManaged,
Serialized FormOPEN, POWER_MANAGE| Constructor and Description |
|---|
WatchdogTimerPermission(java.lang.String name)
Constructs a new
WatchdogTimerPermission with the specified target name and the implicit open action. |
WatchdogTimerPermission(java.lang.String name,
java.lang.String actions)
Constructs a new
WatchdogTimerPermission instance with the specified target name and action list. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Checks two
WatchdogTimerPermission objects for equality. |
java.lang.String |
getActions()
Returns the list of possible actions in the following order:
open or powermanage. |
int |
hashCode()
Returns the hash code value for this object.
|
boolean |
implies(java.security.Permission permission)
Checks if this
WatchdogTimerPermission object "implies" the specified permission. |
java.security.PermissionCollection |
newPermissionCollection()
Returns a new
PermissionCollection for storing WatchdogTimerPermission objects. |
public WatchdogTimerPermission(java.lang.String name)
WatchdogTimerPermission with the specified target name and the implicit open action.name - the target name (as defined above).java.lang.NullPointerException - if name is null.Permission.getName()public WatchdogTimerPermission(java.lang.String name,
java.lang.String actions)
WatchdogTimerPermission instance with the specified target name and action list.name - the target name (as defined above).actions - comma-separated list of peripheral operations: open or powermanage.java.lang.NullPointerException - if name is null.java.lang.IllegalArgumentException - if name is empty or if actions is null, empty or contains an action other than the
specified possible actions.Permission.getName()public boolean equals(java.lang.Object obj)
WatchdogTimerPermission objects for equality.equals in class PeripheralPermissionobj - the object to test for equality with this object.true if obj is a WatchdogTimerPermission and has the same target name and actions as
this WatchdogTimerPermission object.public java.lang.String getActions()
open or powermanage. getActions in class PeripheralPermissionpublic int hashCode()
hashCode in class PeripheralPermissionpublic boolean implies(java.security.Permission permission)
WatchdogTimerPermission object "implies" the specified permission.
More specifically, this method returns true if:
permission is an instance of WatchdogTimerPermission, and
permission's actions are a proper subset of this object's action list, and
permission's peripheral ID, name, hardware addressing information or range thereof
is included in this peripheral ID, name or hardware addressing information range, whichever is defined.
implies in class PeripheralPermissionpermission - the permission to check against.true if the specified permission is not null and is implied by this object, false
otherwise.public java.security.PermissionCollection newPermissionCollection()
PermissionCollection for storing WatchdogTimerPermission objects.
WatchdogTimerPermission objects must be stored in a manner that allows them to be inserted into the
collection in any order, but that also enables the PermissionCollection implies method to be implemented
in an efficient (and consistent) manner.
If null is returned, then the caller of this method is free to store permissions of this type in any
PermissionCollection they choose (one that uses a Hashtable, one that uses a Vector, etc).
newPermissionCollection in class PeripheralPermissionPermissionCollection suitable for storing WatchdogTimerPermission objects, or
null if one is not defined.Copyright © 2012, 2013, Oracle and/or its affiliates. All rights reserved.
Legal Notices