public final class IMCProtocolPermission
extends javax.microedition.io.GCFPermission
IMCProtocolPermission
consists of a URI string but no actions
list.
For details of the URI syntax see IMCConnection
and
IMCServerConnection
description.IMCConnection
Constructor and Description |
---|
IMCProtocolPermission(java.lang.String uri)
Creates a new
IMCProtocolPermission with the specified URI
as its name. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Checks two
IMCProtocolPermission objects for equality. |
java.lang.String |
getActions()
Returns the canonical string representation of the actions, which currently
is the empty string "", since there are no actions defined for
IMCProtocolPermission . |
int |
hashCode()
Returns the hash code value for this object.
|
boolean |
implies(java.security.Permission p)
Checks if this
IMCProtocolPermission object "implies"
the specified permission. |
java.security.PermissionCollection |
newPermissionCollection()
Returns a new
PermissionCollection for storing
IMCProtocolPermission objects. |
public IMCProtocolPermission(java.lang.String uri)
IMCProtocolPermission
with the specified URI
as its name. The URI string must conform to the specification given in
the IMCConnection
or IMCServerConnection
description, but
it is allowed to replace <server name> and / or <server version>
components by a wildcard ('*'). It is then normalized to facilitate
subsequent comparisons.uri
- the URI stringjava.lang.NullPointerException
- if uri is nulljava.lang.IllegalArgumentException
- if uri is malformedpublic boolean equals(java.lang.Object obj)
IMCProtocolPermission
objects for equality.equals
in class java.security.Permission
obj
- the object we are testing for equality with the current objecttrue
if IMCProtocolPermission
and has the same URI string as
this IMCProtocolPermission
object.public java.lang.String getActions()
IMCProtocolPermission
.getActions
in class java.security.Permission
public int hashCode()
hashCode
in class java.security.Permission
public boolean implies(java.security.Permission p)
IMCProtocolPermission
object "implies"
the specified permission.
Returns true
iff:
"*"
in the Object's name (URI)"imc://ExampleIMCAppUID:ExampleIMCApps:1.5:example.Server:1.0;"
implies only
"imc://ExampleIMCAppUID:ExampleIMCApps:1.5:example.Server:1.0;"
"imc://*:com.foo.services.barServer:1.0"
implies
"imc://ExampleIMCAppUID:ExampleIMCApps:1.5:com.foo.services.barServer:1.0;"
"imc://*:*:*"
implies
"imc://ExampleIMCAppUID:ExampleIMCApps:1.5:com.foo.services.barServer:1.0;"
"imc://*:ExampleIMCApps:1.5:com.foo.services.barServer:*"
implies
"imc://*:ExampleIMCApps:1.5:com.foo.services.barServer:1.0;"
implies
in class java.security.Permission
p
- the permission to check againsttrue
if the specified permission is implied by this
object, false
if notpublic java.security.PermissionCollection newPermissionCollection()
PermissionCollection
for storing
IMCProtocolPermission
objects.
IMCProtocolPermission
objects must be stored in a manner that
allows them to be inserted into the collection in any order, but that
also enables the PermissionCollection
implies
method to be implemented in an efficient (and consistent) manner.
If null
is returned, then the caller of this method is free
to store permissions of this type in any PermissionCollection
he chooses (one that uses a Hashtable
, one that uses a
Vector
, etc).
newPermissionCollection
in class java.security.Permission
PermissionCollection
suitable for storing
IMCProtocolPermission
objects, or null
if none is defined.Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. Use of this specification is subject to license terms.