net.jini.jeri
Class BasicJeriTrustVerifier
java.lang.Object
net.jini.jeri.BasicJeriTrustVerifier
- All Implemented Interfaces:
- TrustVerifier
- public class BasicJeriTrustVerifier
- extends Object
- implements TrustVerifier
Trust verifier for dynamic proxies and object endpoints used in Jini(TM)
extensible remote invocation (Jini ERI). This class is intended to be
specified in a resource to configure the operation of Security.verifyObjectTrust.
- Since:
- 2.0
|
Method Summary |
boolean |
isTrustedObject(Object obj,
TrustVerifier.Context ctx)
Returns true if the specified object is a trusted
Jini ERI dynamic proxy or a trusted Jini ERI object endpoint;
returns false otherwise.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicJeriTrustVerifier
public BasicJeriTrustVerifier()
- Creates an instance.
isTrustedObject
public boolean isTrustedObject(Object obj,
TrustVerifier.Context ctx)
throws RemoteException
- Returns
true if the specified object is a trusted
Jini ERI dynamic proxy or a trusted Jini ERI object endpoint;
returns false otherwise.
For the purposes of this verifier, the specified object is a trusted
Jini ERI dynamic proxy if all of the following are true:
- The object is an instance of
RemoteMethodControl.
- The object is an instance of a dynamic proxy class; that is, a
class generated by
Proxy.
- The class loader of the dynamic proxy class is either equal to or an
ancestor of the class loader returned by the trust verifier context's
getClassLoader method (or the current context class loader, if that
method returns null), or its codebase (as given by
RMIClassLoader.getClassAnnotation) provides integrity. The codebase
provides integrity if calling Security.verifyCodebaseIntegrity with that codebase and the
trust verifier context's class loader returns normally. (If that
method throws an exception, the exception is caught and this method
returns false.)
- The
InvocationHandler contained in the
dynamic proxy is an instance of BasicInvocationHandler
(not a subclass).
- The object endpoint in that invocation handler is trusted; that is,
calling the specified context's
isTrustedObject method with the object endpoint returns
true.
- The server constraints in that invocation handler are trusted; that
is, calling the specified context's
isTrustedObject method
with the server constraints returns true.
For the purposes of this verifier, the specified object is a trusted
Jini ERI object endpoint if the object is an instance of
BasicObjectEndpoint and its transport endpoint is
trusted; that is, calling the specified context's
isTrustedObject method with the transport endpoint returns
true.
- Specified by:
isTrustedObject in interface TrustVerifier
- 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:
true if the specified object is known to be
trusted to correctly implement its contract; false
otherwise
- Throws:
NullPointerException - if any argument is null
RemoteException - if a communication-related exception occurs
Copyright © 2003 Sun Microsystems, Inc. All rights reserved