public class UARTPermission extends DevicePermission
UARTPermission
class defines permissions for UART channel access.
A UARTPermission
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 DevicePermission
class
with the following addition:
{channel-desc}
- The
{channel-desc}
string (described inDevicePermission
) is the decimal string representation of a UART channel number as may be returned by a call toUARTConfig.getChannelNumber
. The characters in the string must all be decimal digits.
The supported actions are open
and powermanage
as defined in DevicePermission
.
DeviceManager.open
,
PowerManaged
OPEN, POWER_MANAGE
Constructor and Description |
---|
UARTPermission(java.lang.String name)
Constructs a new
UARTPermission with the specified target name and the implicit open action. |
UARTPermission(java.lang.String name,
java.lang.String actions)
Constructs a new
UARTPermission instance with the specified target name and action list. |
equals, getActions, hashCode, implies, newPermissionCollection
public UARTPermission(java.lang.String name)
UARTPermission
with the specified target name and the implicit open
action.
The target name is normalized so that leading and trailing spaces are removed
and each occurrence of {controller-number}
and {channel-desc}
is represented in its canonical
decimal representation form (without leading zeros).name
- the target name (as defined above).java.lang.NullPointerException
- if name
is null
.java.lang.IllegalArgumentException
- if name
is not properly formatted.getName
public UARTPermission(java.lang.String name, java.lang.String actions)
UARTPermission
instance with the specified target name and action list.
The target name is normalized so that leading and trailing spaces are removed
and each occurrence of {controller-number}
and {channel-number}
is represented in its canonical
decimal representation form (without leading zeros).name
- the target name (as defined above).actions
- comma-separated list of device operations: open
or powermanage
.java.lang.NullPointerException
- if name
is null
.java.lang.IllegalArgumentException
- actions
is null
, empty or contains an action other than the
specified possible actions,name
is not properly formatted.getName
Copyright © 2012, 2015, Oracle and/or its affiliates. All rights reserved.
Legal Notices