com.sun.jini.fiddler
Class ProxyVerifier
java.lang.Object
com.sun.jini.fiddler.ProxyVerifier
- All Implemented Interfaces:
- Serializable, TrustVerifier
final class ProxyVerifier
- extends Object
- implements Serializable, TrustVerifier
This class defines a trust verifier for the proxies related to the
Fiddler implementation of the lookup discovery service.
- Since:
- 2.0
- Author:
- Sun Microsystems, Inc.
- See Also:
TrustVerifier
Field Summary |
private RemoteMethodControl |
innerProxy
The canonical instance of the inner proxy to the service. |
private Uuid |
proxyID
The unique identifier associated with the backend server referenced
by the innerProxy , used for comparison with the IDs
extracted from the smart proxies being verified. |
private static long |
serialVersionUID
|
Constructor Summary |
ProxyVerifier(Fiddler innerProxy,
Uuid proxyID)
Constructs an instance of TrustVerifier that can be
used to determine whether or not a given proxy is equivalent in
trust, content, and function to the service's innerProxy
referenced in the class constructed here. |
Method Summary |
boolean |
isTrustedObject(Object obj,
TrustVerifier.Context ctx)
Returns true if the specified proxy object (that is
not yet known to be trusted) is equivalent in trust, content, and
function to the canonical inner proxy object referenced in this
class; otherwise returns false . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
innerProxy
private final RemoteMethodControl innerProxy
- The canonical instance of the inner proxy to the service. This
instance will be used by the
isTrusted
method
as the known trusted object used to determine whether or not a
given proxy is equivalent in trust, content, and function.
proxyID
private final Uuid proxyID
- The unique identifier associated with the backend server referenced
by the
innerProxy
, used for comparison with the IDs
extracted from the smart proxies being verified.
ProxyVerifier
ProxyVerifier(Fiddler innerProxy,
Uuid proxyID)
- Constructs an instance of
TrustVerifier
that can be
used to determine whether or not a given proxy is equivalent in
trust, content, and function to the service's innerProxy
referenced in the class constructed here.
- Parameters:
innerProxy
- canonical instance of the inner proxy to the service.
The isTrustedObject
method will
determine whether or not proxies input to that
method are equivalent in trust, content, and function
to this object.proxyID
- instance of Uuid
containing the unique
identifier associated with the backend server
referenced by the innerProxy
paramater.
- Throws:
UnsupportedOperationException
- if innerProxy
does
not implement both RemoteMethodControl
and TrustEquivalence
isTrustedObject
public boolean isTrustedObject(Object obj,
TrustVerifier.Context ctx)
throws RemoteException
- Returns
true
if the specified proxy object (that is
not yet known to be trusted) is equivalent in trust, content, and
function to the canonical inner proxy object referenced in this
class; otherwise returns false
.
- Specified by:
isTrustedObject
in interface TrustVerifier
- Parameters:
obj
- proxy object that will be compared to this class' stored
canonical proxy to determine whether or not the given
proxy object is equivalent in trust, content, and function.ctx
- the trust verifier context, to aid in verification of
the specified object and its components
- Returns:
true
if the specified object (that is not yet
known to be trusted) is equivalent in trust,
content, and function to the canonical inner
proxy object referenced in this class;
otherwise returns false
.
- Throws:
NullPointerException
- if any argument is null
RemoteException
- if a communication-related exception occurs
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.