public class PushRegistryPermission
extends java.security.Permission
PushRegistry.registerConnection
and alarm registration with PushRegistry.registerAlarm
.
For the purposes of Push Registration permission, the URI MUST consist only
of the scheme and delimiter (":") as defined by
[RFC3986].
The scheme may contain the wildcard character "*", which allows registration of
all schemes.
For alarm registration, the uri is "*"
and
the action is alarm
.
Push registration and alarm registration can be combined in a single permission.
For example, uri="file:"
and actions="static,dynamic,alarm"
.
The permissible actions and descriptions are listed in the Actions Table:
Action | Description |
---|---|
static | Allows registration of a Push Connection in the packaging of the application suite |
dynamic | Allows registration of a Push Connection using
PushRegistry.registerConnection |
alarm | Allows registration of an alarm using
PushRegistry.registerAlarm |
PushRegistry.registerConnection
,
PushRegistry.registerAlarm
Constructor and Description |
---|
PushRegistryPermission(java.lang.String uri,
java.lang.String actions)
Creates a new instance of PushRegistryPermission.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object)
Checks if another object is equal to this one.
|
java.lang.String |
getActions()
Returns the canonical string representation of the actions.
|
int |
hashCode()
Gets the hash code value for this object.
|
boolean |
implies(java.security.Permission p)
Checks if the specified permission is "implied" by this object.
|
public PushRegistryPermission(java.lang.String uri, java.lang.String actions)
"*"
would be used with the "alarm"
action.uri
- The resource name is the URI of the incoming connection;
the URI MUST contain only the scheme and the delimiter ":" or wildcard "*".actions
- one or more of the actions listed in the Actions Table,
separated by "," if more than 1. The list must not contain
white spaces (neither leading nor trailing nor in between).java.lang.IllegalArgumentException
- If the URI contains anything other
than the non-empty scheme and the delimiter ":" or the wildcard "*" .java.lang.IllegalArgumentException
- if actions
contains
actions that are not listed in the Actions Table.java.lang.NullPointerException
- if uri
or actions
parameter is null
public boolean implies(java.security.Permission p)
true
iff:
"*"
andimplies
in class java.security.Permission
p
- the permission to check against.true
if the specified permission is implied
by this object, otherwise false
.public java.lang.String getActions()
getActions
must return the string
"static,dynamic,alarm".getActions
in class java.security.Permission
public int hashCode()
hashCode
in class java.security.Permission
getName
+
the hashcode of getActions
.public boolean equals(java.lang.Object object)
equals
in class java.security.Permission
object
- an object to comparetrue
if the objects are of the same type
and the respective names and actions are equal.Copyright (c) 2014, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.