RCPermission

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.dvb.net.rc
Class RCPermission

    java.lang.Object
      java.security.Permission
          java.security.BasicPermission
              org.dvb.net.rc.RCPermission

All Implemented Interfaces:
  Serializable, Guard

    public class RCPermission

extends BasicPermission

This class is for return channel set-up permissions. An RCPermission contains a name, but no actions list.

The permission name can be "target:default", which indicates the permission to use the default connection parameters.

The permission name can also be "target:<phone number>", which indicates the permission to use the specified phone number in the connection set-up (ConnectionRCInterface.setTarget(ConnectionParameters) method).

A wildcard may be used at the end of the permission name. In that case, all phone numbers starting with the number before the wildcard are included in the permission. A "+" may be used at the start of the phone number to indicate a phone number including the international country code.

Examples:

- target:0206234342 (Permission to dial the specified phone number)
- target:020* (Permission to dial phone numbers starting with 020)
- target:* (Permission to dial all phone numbers, including the default)

Note: ConnectionRCInterface.reserve(ResourceClient, Object) will throw a SecurityException if the application is not allowed to set-up a connection over the return channel at all (i.e., there is no valid target allowed).

See Also:
  Serialized Form

Constructor Summary
`RCPermission(String name)` Creates a new RCPermission with the specified name.
`RCPermission(String name, String actions)` Creates a new RCPermission object with the specified name.

Method Summary
`boolean` | `implies(Permission p)` Checks if this RCPermission "implies" the specified Permission.

Methods inherited from class java.security.BasicPermission
`equals, getActions, hashCode, newPermissionCollection`

Methods inherited from class java.security.Permission
`checkGuard, getName, toString`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### RCPermission

    public RCPermission(String name)

  Creates a new RCPermission with the specified name. The name is the symbolic name of the RCPermission.

  Parameters:
    `name` - the name of the RCPermission

### RCPermission

    public RCPermission(String name,
                        String actions)

  Creates a new RCPermission object with the specified name. The name is the symbolic name of the RCPermission, and the actions String is unused and should be null. This constructor exists for use by the Policy object to instantiate new Permission objects.

  Parameters:
    `name` - the name of the RCPermission
    `actions` - should be null.

Method Detail

### implies

    public boolean implies(Permission p)

  Checks if this RCPermission "implies" the specified Permission.

  More specifically, this returns true if and only if:

  - p is an instance of RCPermission, and
  - p's name is implied by the name of this permission, as described by the wildcarding rules specified in the the description of this class.

  Overrides:
    `implies` in class `BasicPermission`
  Parameters:
    `p` - The Permission to check against.
  Returns:
    true if the specified Permission is implied by this object; false otherwise.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD