CLDC 1.1.1

javax.microedition.io
Class GCFPermission

java.lang.Object
  extended byjava.security.Permission
      extended byjavax.microedition.io.GCFPermission
Direct Known Subclasses:
CommProtocolPermission, DatagramProtocolPermission, FileProtocolPermission, HttpProtocolPermission, HttpsProtocolPermission, SocketProtocolPermission, SSLProtocolPermission

public abstract class GCFPermission
extends Permission

An abstract class that is the superclass of all permissions used with the Generic Connection Framework. A GCFPermission consists of a URI string representing access rights to a connection based on the specified protocol scheme. The URI must conform to the syntax requirements of RFC 3986 with extensions to permit wildcard matching.

A specification that extends the Generic Connection Framework with a new protocol scheme should define a subclass of GCFPermission to guard access to the protocol.

See Also:
Connector.open(java.lang.String)

Constructor Summary
GCFPermission(String uri)
          Constructs a GCFPermission with the specified URI.
 
Method Summary
 String getProtocol()
          Returns the protocol scheme of this GCFPermission.
 String getURI()
          Returns the URI of this GCFPermission.
 
Methods inherited from class java.security.Permission
equals, getActions, getName, hashCode, implies, newPermissionCollection, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GCFPermission

public GCFPermission(String uri)
Constructs a GCFPermission with the specified URI. The URI must conform to the syntax requirements of RFC 3986 with extensions to permit wildcard matching. This constructor performs protocol-independent normalization of the specified URI string; subsequent queries for the URI or portions of the URI will reflect the normalized form.

Parameters:
uri - the URI string.
Throws:
IllegalArgumentException - if uri is malformed.
NullPointerException - if uri is null.
See Also:
getURI()
Method Detail

getURI

public String getURI()
Returns the URI of this GCFPermission.

Returns:
the URI string, identical to Permission.getName().
See Also:
Permission.getName()

getProtocol

public String getProtocol()
Returns the protocol scheme of this GCFPermission. The protocol scheme is the string preceding the first ':' in the URI.

Returns:
the protocol scheme portion of the URI string.
See Also:
getURI()

CLDC 1.1.1

Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. Use of this specification is subject to license terms.