Top Description Fields Constructors Methods
org.osgi.service.condpermadmin

pack-priv final Class BooleanCondition

Located in compilation unit of org.osgi.service.condpermadmin.Condition.

extends Object
implements Condition
Class Inheritance
All Implemented Interfaces
org.osgi.service.condpermadmin.Condition

Package private class used to define the Condition#FALSE and Condition#TRUE constants.

Field Summary

Modifier and TypeField and Description
private final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
BooleanCondition(boolean satisfied)

Method Summary

Modifier and TypeMethod and Description
public boolean
isMutable()

Implements org.osgi.service.condpermadmin.Condition.isMutable.

Returns whether the Condition is mutable.

public boolean
isPostponed()

Implements org.osgi.service.condpermadmin.Condition.isPostponed.

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

public boolean
isSatisfied()

Implements org.osgi.service.condpermadmin.Condition.isSatisfied.

Returns whether the Condition is satisfied.

public boolean
isSatisfied(Condition[]
The array of Condition objects, which must all be of the same class and mutable. The receiver must be one of those Condition objects.
conds
,
Dictionary<Object, Object>
A Dictionary object that implementors can use to track state. If this method is invoked multiple times in the same permission check, 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 invocations are needed.
context
)

Implements org.osgi.service.condpermadmin.Condition.isSatisfied.

Returns whether the specified set of Condition objects are satisfied.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

satisfiedback to summary
private final boolean satisfied

Constructor Detail

BooleanConditionback to summary
pack-priv BooleanCondition(boolean satisfied)

Method Detail

isMutableback to summary
public boolean isMutable()

Implements org.osgi.service.condpermadmin.Condition.isMutable.

Doc from org.osgi.service.condpermadmin.Condition.isMutable.

Returns whether the Condition is mutable. A Condition can go from mutable (true) to immutable (false) over time but never from immutable (false) to mutable (true).

Returns:boolean

true isSatisfied() can change. Otherwise, false if the value returned by isSatisfied() will not change for this condition.

isPostponedback to summary
public boolean isPostponed()

Implements org.osgi.service.condpermadmin.Condition.isPostponed.

Doc from org.osgi.service.condpermadmin.Condition.isPostponed.

Returns whether the evaluation must be postponed until the end of the permission check. If this method returns false (or this Condition is immutable), then 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 or networks, need to be consulted.

This method must always return the same value whenever it is called so that the Conditional Permission Admin can cache its result.

Returns:boolean

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

isSatisfiedback to summary
public boolean isSatisfied()

Implements org.osgi.service.condpermadmin.Condition.isSatisfied.

Doc from org.osgi.service.condpermadmin.Condition.isSatisfied.

Returns whether the Condition is satisfied. This method is only called for immediate Condition objects or immutable postponed conditions, and must always be called inside a permission check. Mutable postponed Condition objects will be called with the grouped version isSatisfied(Condition[], Dictionary) at the end of the permission check.

Returns:boolean

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

isSatisfiedback to summary
public boolean isSatisfied(Condition[] conds, Dictionary<Object, Object> context)

Implements org.osgi.service.condpermadmin.Condition.isSatisfied.

Doc from org.osgi.service.condpermadmin.Condition.isSatisfied.

Returns whether the specified set of Condition objects are satisfied. Although this method is not static, it must be implemented as if it were static. All of the passed Condition objects will be of the same type and will correspond to the class type of the object on which this method is invoked. This method must be called inside a permission check only.

Parameters
conds:Condition[]

The array of Condition objects, which must all be of the same class and mutable. The receiver must be one of those Condition objects.

context:Dictionary<Object, Object>

A Dictionary object that implementors can use to track state. If this method is invoked multiple times in the same permission check, 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 invocations are needed.

Returns:boolean

true if all the Condition objects are satisfied. Otherwise, false if one of the Condition objects is not satisfied.