net.jini.discovery
Class DiscoveryPermission
java.lang.Object
|
+--java.security.Permission
|
+--net.jini.discovery.DiscoveryPermission
- public final class DiscoveryPermission
- extends java.security.Permission
- implements java.io.Serializable
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 platform security model,
permission must be granted not only to the code that calls LookupDiscovery,
but also to LookupDiscovery itself.
- See Also:
LookupDiscovery
, Serialized Form
Method Summary |
boolean |
equals(java.lang.Object obj)
Two instances are equal if they have the same name. |
java.lang.String |
getActions()
Always returns the empty string; this permission type has no actions
list. |
int |
hashCode()
|
boolean |
implies(java.security.Permission p)
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. |
java.security.PermissionCollection |
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 |
DiscoveryPermission
public DiscoveryPermission(java.lang.String group)
- Simple constructor.
- Parameters:
group
- the group name (wildcard permitted)
DiscoveryPermission
public DiscoveryPermission(java.lang.String group,
java.lang.String action)
- Simple constructor.
- Parameters:
group
- the group name (wildcard permitted)action
- ignored
implies
public boolean implies(java.security.Permission p)
- 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.
- Overrides:
- implies in class java.security.Permission
equals
public boolean equals(java.lang.Object obj)
- Two instances are equal if they have the same name.
- Overrides:
- equals in class java.security.Permission
hashCode
public int hashCode()
- Overrides:
- hashCode in class java.security.Permission
getActions
public java.lang.String getActions()
- Always returns the empty string; this permission type has no actions
list.
- Overrides:
- getActions in class java.security.Permission
newPermissionCollection
public java.security.PermissionCollection newPermissionCollection()
- Overrides:
- newPermissionCollection in class java.security.Permission
Copyright © 1999 Sun Microsystems, Inc. All rights reserved