* - ConstrainableParticipantProxy
* - ConstrainableLandlordLease (via LandlordProxyVerifier)
*/
// Server reference from input proxy
final RemoteMethodControl inputProxyServer;
final Uuid inputProxyUuid;
if (obj instanceof ConstrainableSpaceProxy2) {
final ConstrainableSpaceProxy2 csp = (ConstrainableSpaceProxy2)obj;
inputProxyUuid = csp.getReferentUuid();
inputProxyServer = (RemoteMethodControl)csp.space;
} else if (obj instanceof ConstrainableAdminProxy) {
final ConstrainableAdminProxy cap = (ConstrainableAdminProxy)obj;
inputProxyUuid = cap.getReferentUuid();
inputProxyServer = (RemoteMethodControl)cap.admin;
} else if (obj instanceof ConstrainableParticipantProxy) {
final ConstrainableParticipantProxy cpp =
(ConstrainableParticipantProxy)obj;
inputProxyUuid = cpp.getReferentUuid();
inputProxyServer = (RemoteMethodControl)cpp.space;
} else if (obj instanceof OutriggerServer &&
obj instanceof RemoteMethodControl)
{
// obj may be our inner proxy, which does not hold
// a ref to uuid, to simplify the logic just make
// inputProxyUuid = uuid.
inputProxyUuid = uuid;
inputProxyServer = (RemoteMethodControl)obj;
} else {
final LandlordProxyVerifier lpv =
new LandlordProxyVerifier((Landlord)server, uuid);
return lpv.isTrustedObject(obj, ctx);
}
// Check Uuid first
if (!uuid.equals(inputProxyUuid))
return false;
/* Get the client constraints currently set on the server reference
* of contained in the input proxy
*/
final MethodConstraints mConstraints =
inputProxyServer.getConstraints();
/* Create a copy of the canonical server reference with its method
* constraints replaced with the method constraints on
* server reference of the input proxy.
*/