new Object[] { obj, ctx });
}
if (obj == null || ctx == null) {
throw new NullPointerException("Arguments must not be null");
}
RemoteMethodControl otherServerProxy;
Uuid inputProxyID = null;
if (obj instanceof TxnMgrProxy.ConstrainableTxnMgrProxy) {
otherServerProxy = (RemoteMethodControl)
((TxnMgrProxy)obj).backend;
inputProxyID = ((ReferentUuid)obj).getReferentUuid();
} else if (obj instanceof ConstrainableLandlordLease) {
final LandlordProxyVerifier lpv =
new LandlordProxyVerifier((Landlord)serverProxy, proxyID);
return lpv.isTrustedObject(obj, ctx);
} else if (
obj instanceof TxnMgrAdminProxy.ConstrainableTxnMgrAdminProxy) {
otherServerProxy = (RemoteMethodControl)
((TxnMgrAdminProxy)obj).server;
inputProxyID = ((ReferentUuid)obj).getReferentUuid();
} else if (obj instanceof TxnManager &&
obj instanceof RemoteMethodControl) {
otherServerProxy = (RemoteMethodControl)obj;
inputProxyID = proxyID;
} else {
logger.log(Level.FINEST, "Object {0} is not a supported type",
obj);
return false;
}
// For top-level proxies, quickly verify proxy Uuid
if ((inputProxyID != null) &&
!(proxyID.equals(inputProxyID))) {
return false;
}
MethodConstraints mc = otherServerProxy.getConstraints();
TrustEquivalence trusted =
(TrustEquivalence) serverProxy.setConstraints(mc);
boolean result = trusted.checkTrustEquivalence(otherServerProxy);
if (logger.isLoggable(Level.FINER)) {
logger.exiting(ProxyVerifier.class.getName(), "isTrustedObject",