Package net.jini.core.constraint

Examples of net.jini.core.constraint.RemoteMethodControl


                                                MethodConstraints constraints )
        {
            MethodConstraints newConstraints
               = ConstrainableProxyUtil.translateConstraints(constraints,
                                                             methodMapArray);
            RemoteMethodControl constrainedServer =
                ((RemoteMethodControl)server).setConstraints(newConstraints);

            return ((Fiddler)constrainedServer);
        }//end constrainServer
View Full Code Here


                                                MethodConstraints constraints )
        {
            MethodConstraints newConstraints
               = ConstrainableProxyUtil.translateConstraints(constraints,
                                                             methodMapArray);
            RemoteMethodControl constrainedServer =
                ((RemoteMethodControl)server).setConstraints(newConstraints);

            return ((Fiddler)constrainedServer);
        }//end constrainServer
View Full Code Here

                                                MethodConstraints constraints )
        {
            MethodConstraints newConstraints
               = ConstrainableProxyUtil.translateConstraints(constraints,
                                                             methodMapArray);
            RemoteMethodControl constrainedServer =
                ((RemoteMethodControl)server).setConstraints(newConstraints);

            return ((Fiddler)constrainedServer);
        }//end constrainServer
View Full Code Here

                                                MethodConstraints constraints )
        {
            MethodConstraints newConstraints
               = ConstrainableProxyUtil.translateConstraints(constraints,
                                                             methodMapArray);
            RemoteMethodControl constrainedServer =
                ((RemoteMethodControl)server).setConstraints(newConstraints);

            return ((Fiddler)constrainedServer);
        }//end constrainServer
View Full Code Here

         *  applied to the given client method constraints.
         */
        private static TxnManager constrainServer(TxnManager server,
                                                MethodConstraints constraints)
        {
            RemoteMethodControl constrainedServer =
                ((RemoteMethodControl)server).setConstraints(constraints);

            return ((TxnManager)constrainedServer);
        }//end constrainServer
View Full Code Here

                                                MethodConstraints constraints )
        {
            MethodConstraints newConstraints
               = ConstrainableProxyUtil.translateConstraints(constraints,
                                                             methodMapArray);
            RemoteMethodControl constrainedServer =
                ((RemoteMethodControl)server).setConstraints(newConstraints);

            return ((Fiddler)constrainedServer);
        }//end constrainServer
View Full Code Here

  MethodConstraints constraints, Method[] mapping)
    {
  final MethodConstraints serverRefConstraints
      = ConstrainableProxyUtil.translateConstraints(constraints,
                mapping);
  final RemoteMethodControl constrainedServer =
      ((RemoteMethodControl)server).
      setConstraints(serverRefConstraints);

  return (Landlord)constrainedServer;
    }
View Full Code Here

          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",
View Full Code Here

   *  - 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.
         */
 
View Full Code Here

                                                MethodConstraints constraints )
        {
            MethodConstraints newConstraints
               = ConstrainableProxyUtil.translateConstraints(constraints,
                                                             methodMapArray);
            RemoteMethodControl constrainedServer =
                ((RemoteMethodControl)server).setConstraints(newConstraints);

            return ((Fiddler)constrainedServer);
        }//end constrainServer
View Full Code Here

TOP

Related Classes of net.jini.core.constraint.RemoteMethodControl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.