Package net.jini.constraint
Class ConstraintTrustVerifier
java.lang.Object
net.jini.constraint.ConstraintTrustVerifier
- All Implemented Interfaces:
TrustVerifier
Trust verifier for instances of the constraint classes defined in the
net.jini.core.constraint package, and for the BasicMethodConstraints, X500Principal and KerberosPrincipal classes. This class is intended to be specified in a
resource to configure the operation of Security.verifyObjectTrust.- Since:
- 2.0
- Author:
- Sun Microsystems, Inc.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.jini.security.TrustVerifier
TrustVerifier.Context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisTrustedObject(Object obj, TrustVerifier.Context ctx) Returnstrueif the specified object is known to be trusted to correctly implement its contract; returnsfalseotherwise.
-
Constructor Details
-
ConstraintTrustVerifier
public ConstraintTrustVerifier()Creates an instance.
-
-
Method Details
-
isTrustedObject
Returnstrueif the specified object is known to be trusted to correctly implement its contract; returnsfalseotherwise. Returnstrueif any of the following conditions holds, and returnsfalseotherwise:- The object is an instance of any of the following classes:
- The
object is an instance of any of the following classes: and all of the principals
in that object are trusted (determined by calling the
isTrustedObjectmethod on the specified context with each principal) - The object is an instance of
ConstraintAlternativesand all of the constraint alternatives in that object are trusted (determined by calling theisTrustedObjectmethod on the specified context with each constraint alternative) - The object is an instance of
BasicMethodConstraintsand all theInvocationConstraintsinstances in that object are trusted (determined by calling theisTrustedObjectmethod on the specified context with each instance) - The object is an instance of
InvocationConstraintsand all of the constraints (both requirements and preferences) in that object are trusted (determined by calling theisTrustedObjectmethod on the specified context with each constraint) - The object is an instance of
X500PrincipalorKerberosPrincipal
- Specified by:
isTrustedObjectin interfaceTrustVerifier- Parameters:
obj- the object in which to verify trustctx- the trust verifier context, to aid in verification of the specified object and its components- Returns:
trueif the specified object is known to be trusted to correctly implement its contract;falseotherwise- Throws:
NullPointerException- if any argument isnullRemoteException- if a communication-related exception occurs
-