Package net.jini.discovery
Class DiscoveryPermission
java.lang.Object
java.security.Permission
net.jini.discovery.DiscoveryPermission
- All Implemented Interfaces:
Serializable,Guard
Permission for using LookupDiscovery. The permission contains a name but no actions list. The
name is a discovery group name. The empty string represents the "public" group (as usual). The
name "*" represents all groups. The name can start with "*." to signify a prefix wildcard match;
in this case, group names are assumed to be in dotted domain name style (e.g., "*.sun.com").
Note that, due to limitations of the Java(TM) platform security model, permission must be granted not only to the code that calls LookupDiscovery, but also to LookupDiscovery itself.
- Author:
- Sun Microsystems, Inc.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDiscoveryPermission(String group) Simple constructor.DiscoveryPermission(String group, String action) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTwo instances are equal if they have the same name.Always returns the empty string; this permission type has no actions list.inthashCode()booleanReturns true if the name of this permission (the one on which the method is invoked) is the same as the name of the permission parameter, or if the name of this permission starts with '*' and the remainder (after the '*') is a suffix of the name of the permission parameter.Methods inherited from class java.security.Permission
checkGuard, getName, toString
-
Constructor Details
-
DiscoveryPermission
Simple constructor.- Parameters:
group- the group name (wildcard permitted)
-
DiscoveryPermission
Simple constructor.- Parameters:
group- the group name (wildcard permitted)action- ignored
-
-
Method Details
-
implies
Returns true if the name of this permission (the one on which the method is invoked) is the same as the name of the permission parameter, or if the name of this permission starts with '*' and the remainder (after the '*') is a suffix of the name of the permission parameter.- Specified by:
impliesin classPermission
-
equals
Two instances are equal if they have the same name.- Specified by:
equalsin classPermission
-
hashCode
public int hashCode()- Specified by:
hashCodein classPermission
-
getActions
Always returns the empty string; this permission type has no actions list.- Specified by:
getActionsin classPermission
-
newPermissionCollection
- Overrides:
newPermissionCollectionin classPermission
-