|
OSGi™ Service Platform Release 4 Version 4.2 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Condition
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.
Field Summary | |
---|---|
static Condition |
FALSE
A Condition object that will always evaluate to false and that is never postponed. |
static Condition |
TRUE
A Condition object that will always evaluate to true and that is never postponed. |
Method Summary | |
---|---|
boolean |
isMutable()
Returns whether the Condition is mutable. |
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 |
isSatisfied(Condition[] conditions,
java.util.Dictionary context)
Returns whether a the set of Condition objects are satisfied. |
Field Detail |
---|
static final Condition TRUE
static final Condition FALSE
Method Detail |
---|
boolean isPostponed()
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.
true
to indicate the evaluation must be postponed.
Otherwise, false
if the evaluation can be performed
immediately.boolean isSatisfied()
isSatisfied(Condition[],Dictionary)
at the end of the permission
check.
true
to indicate the Conditions is satisfied.
Otherwise, false
if the Condition is not satisfied.boolean isMutable()
true
) to immutable (false
) over time but never
from immutable (false
) to mutable (true
).
true
isSatisfied()
can change. Otherwise,
false
if the value returned by
isSatisfied()
will not change for this condition.boolean isSatisfied(Condition[] conditions, java.util.Dictionary context)
conditions
- 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
- 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.
true
if all the Condition objects are satisfied.
Otherwise, false
if one of the Condition objects is
not satisfied.
|
OSGi™ Service Platform Release 4 Version 4.2 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |