org.osgi.service.condpermadmin.Condition Interface Reference

Inheritance diagram for org.osgi.service.condpermadmin.Condition:

org.osgi.service.condpermadmin.BooleanCondition

List of all members.


Detailed Description

The interface implemented by a Condition.

Conditions are bound to Permissions using Conditional Permission Info. The Permissions of a ConditionalPermission Info can only be used if the associated Conditions are satisfied.

Version:
Revision
1.13

Definition at line 30 of file Condition.java.


Public Member Functions

boolean isPostponed ()
 Returns whether the evaluation must be postponed until the end of the permission check.
boolean isSatisfied ()
 Returns whether the Condition is satisfied.
boolean isMutable ()
 Returns whether the Condition is mutable.
boolean isSatisfied (Condition conditions[], Dictionary context)
 Returns whether a the set of Conditions are satisfied.

Static Public Attributes

static final Condition TRUE = new BooleanCondition(true)
 A Condition object that will always evaluate to true and that is never postponed.
static final Condition FALSE = new BooleanCondition(false)
 A Condition object that will always evaluate to false and that is never postponed.

Member Function Documentation

boolean org.osgi.service.condpermadmin.Condition.isPostponed (  ) 

Returns whether the evaluation must be postponed until the end of the permission check.

This method returns true if the evaluation of the Condition must be postponed until the end of the permission check. If this method returns false, this Condition must be able to directly answer the isSatisfied() method. In other words, isSatisfied() will return very quickly since no external sources, such as for example users, need to be consulted.

Returns:
true to indicate the evaluation must be postponed. Otherwise, false if the evaluation can be immediately performed.

Implemented in org.osgi.service.condpermadmin.BooleanCondition.

boolean org.osgi.service.condpermadmin.Condition.isSatisfied (  ) 

Returns whether the Condition is satisfied.

Returns:
true to indicate the Conditions is satisfied. Otherwise, false if the Condition is not satisfied.

Implemented in org.osgi.service.condpermadmin.BooleanCondition.

boolean org.osgi.service.condpermadmin.Condition.isMutable (  ) 

Returns whether the Condition is mutable.

Returns:
true to indicate the value returned by isSatisfied() can change. Otherwise, false if the value returned by isSatisfied() will not change.

Implemented in org.osgi.service.condpermadmin.BooleanCondition.

boolean org.osgi.service.condpermadmin.Condition.isSatisfied ( Condition  conditions[],
Dictionary  context 
)

Returns whether a the set of Conditions are satisfied.

Although this method is not static, it must be implemented as if it were static. All of the passed Conditions will be of the same type and will correspond to the class type of the object on which this method is invoked.

Parameters:
conditions The array of Conditions.
context A Dictionary object that implementors can use to track state. If this method is invoked multiple times in the same permission evaluation, the same Dictionary will be passed multiple times. The SecurityManager treats this Dictionary as an opaque object and simply creates an empty dictionary and passes it to subsequent invocations if multiple invocatios are needed.
Returns:
true if all the Conditions are satisfied. Otherwise, false if one of the Conditions is not satisfied.


The documentation for this interface was generated from the following file:
Generated on Mon Jan 11 21:19:24 2010 for OpenMobileIS by  doxygen 1.5.4