public interface TrustEquivalence
TrustVerifier
returned by
ProxyTrust.getProxyVerifier
.
An implementation of this interface must always compare components of the
two objects by invoking comparison methods (such as equals
or checkTrustEquivalence
) on components of
the known trusted object, and those comparison methods must in turn
compare subcomponents in the same fashion, always invoking comparison
methods on components of this
.
For example, in the case of a smart proxy wrapped around an inner proxy,
where the inner proxy results from exporting a remote object, the inner
proxy could be required to be an instance of a class that implements this
interface. The verifier could contain a canonical instance of the inner
proxy, and use its checkTrustEquivalence
method to check
that a candidate smart proxy contains the correct inner proxy.
Modifier and Type | Method and Description |
---|---|
boolean |
checkTrustEquivalence(Object obj)
Returns
true if the specified object (that is not yet
known to be trusted) is equivalent in trust, content, and function to
this known trusted object, and returns false otherwise. |
boolean checkTrustEquivalence(Object obj)
true
if the specified object (that is not yet
known to be trusted) is equivalent in trust, content, and function to
this known trusted object, and returns false
otherwise.
This method is permitted to delete content of the specified object
if that content is cached state that might be stale (relative to the
known trusted object's cached state), cannot otherwise be checked,
and will be recreated on demand (from content that has been checked)
during subsequent operations on the object.obj
- object to check that is not yet known to be trustedtrue
if the specified object (that is not yet
known to be trusted) is equivalent in trust, content, and function to
this known trusted object, and returns false
otherwise