|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.security.Permission
javacardx.security.URIPermission
javacardx.io.ConnectorPermission
@TransactionType(value=NOT_SUPPORTED) public final class ConnectorPermission
This class is for connector permissions. The ConnectorPermission extends the URIPermission and defines specific actions. A ConnectorPermission consists of a URL and a set of actions valid for that URL.
The URL may be of any of the protocols supported by the
javax.microedition.io.Connector
class from the Generic
Connection Framework.
URLs must be absolute - that is they must include the protocol (URL scheme). URL are normalized before interpretation.
The special URL target name consisting of a single "*" matches any connection URL (over whatever protocol).
A URL may be either an exact URL pattern which designates exactly one resource or a pattern which may designate a collection of resources:
URIPermission
for a detailed list of
supported URL patterns.
Examples of valid URL patterns are:
file:///transit/pos/logs/transaction.txt
file:///transit/pos/logs/*
http://java.sun.com/index.html
http://*:*/*
socket://*.sun.com:80
The actions to be granted are passed to the constructor in a string containing a list of one or more comma-separated keywords. The possible keywords are "connect", "listen", "accept", "read", and "write". Their meaning is defined as follows:
The actions string is converted to lowercase before processing.
URIPermission
,
Permission
,
AccessController
,
AccessControlException
Field Summary | |
---|---|
static String |
ACTION_ACCEPT
The "accept" action. |
static String |
ACTION_CONNECT
The "connect" action. |
static String |
ACTION_LISTEN
The "listen" action. |
static String |
ACTION_READ
The "read" action. |
static String |
ACTION_WRITE
The "write" action. |
Constructor Summary | |
---|---|
ConnectorPermission(String url,
String actions)
Creates a new ConnectorPermission object with the specified actions. |
Method Summary | |
---|---|
protected String[] |
getPossibleActions()
Returns the possible actions in the following order: "accept", "connect", "listen", "read", and "write". |
Methods inherited from class javacardx.security.URIPermission |
---|
equals, getActions, hashCode, implies |
Methods inherited from class java.security.Permission |
---|
getName, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String ACTION_CONNECT
public static final String ACTION_LISTEN
public static final String ACTION_ACCEPT
public static final String ACTION_READ
public static final String ACTION_WRITE
Constructor Detail |
---|
public ConnectorPermission(String url, String actions)
url
- a URL pattern.actions
- the action string.
NullPointerException
- if url
or actions
is null
.
IllegalArgumentException
- url
is not the special URL target name "*" or
a well-formed absolute URLactions
is empty or contains an action
other than the specified possible actions.SecurityException
- if url
or actions
is not
accessible in the caller's context.Method Detail |
---|
protected String[] getPossibleActions()
Note: this method returns a different array (a defensive copy) upon each call in order to guarantee the immutability of this permission object.
getPossibleActions
in class URIPermission
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |