org.dvb.net.rc
Class RCPermission

java.lang.Object
  extended byjava.security.Permission
      extended byjava.security.BasicPermission
          extended byorg.dvb.net.rc.RCPermission
All Implemented Interfaces:
java.security.Guard, java.io.Serializable

public class RCPermission
extends java.security.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:

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(java.lang.String name)
          Creates a new RCPermission with the specified name.
RCPermission(java.lang.String name, java.lang.String actions)
          Creates a new RCPermission object with the specified name.
 
Method Summary
 boolean implies(java.security.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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RCPermission

public RCPermission(java.lang.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(java.lang.String name,
                    java.lang.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(java.security.Permission p)
Checks if this RCPermission "implies" the specified Permission.

More specifically, this returns true if and only if:

Parameters:
p - The Permission to check against.
Returns:
true if the specified Permission is implied by this object; false otherwise.