Examples of RemoteMethodControl


Examples of net.jini.core.constraint.RemoteMethodControl

    /**
     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        RemoteMethodControl main = new RMCTEImpl();
        ProxyTrust boot = new RMCPTTEImpl();
        ProxyTrustInvocationHandler ptih = createPTIH(main, boot);
        MarshalledObject mo = new MarshalledObject(ptih);

        try {
View Full Code Here

Examples of net.jini.core.constraint.RemoteMethodControl

     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        RMCTENPIImpl mImpl = new RMCTENPIImpl();
        RemoteMethodControl main = (RemoteMethodControl)
                ProxyTrustUtil.newProxyInstance(mImpl, new InvHandler(mImpl));
        ProxyTrust boot = createValidBootProxy();
        ProxyTrustInvocationHandler ptih = createPTIH(main, boot);
        Object proxy = ProxyTrustUtil.newProxyInstance(new NPIImpl(), ptih);
        Method m = NonPublicInterface.class.getDeclaredMethod("test1",
View Full Code Here

Examples of net.jini.core.constraint.RemoteMethodControl

    /**
     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        RemoteMethodControl main = createValidMainProxy();
        ProxyTrust boot = createValidBootProxy();
        ProxyTrustInvocationHandler ptih = createPTIH(main, boot);
        Object proxy = ProxyTrustUtil.newProxyInstance(
                new Interface12Impl(), ptih);
        Method m = Object.class.getDeclaredMethod("hashCode", new Class[0]);
View Full Code Here

Examples of net.jini.core.constraint.RemoteMethodControl

    /**
     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        RemoteMethodControl main = createValidMainProxy();
        ProxyTrust boot = (ProxyTrust) ProxyTrustUtil.newProxyInstance(
                new RMCPTImpl());

        try {
            createPTIH(main, boot);
View Full Code Here

Examples of net.jini.core.constraint.RemoteMethodControl

     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        RMCTENPIImpl mImpl = new RMCTENPIImpl();
        RemoteMethodControl main = (RemoteMethodControl)
                ProxyTrustUtil.newProxyInstance(mImpl,
                        new InvHandler(mImpl));
        ProxyTrust boot = createValidBootProxy();
        ProxyTrustInvocationHandler ptih = createPTIH(main, boot);
        Object proxy = ProxyTrustUtil.newProxyInstance(new NPIImpl(), ptih);
View Full Code Here

Examples of net.jini.core.constraint.RemoteMethodControl

      if (obj == null || ctx == null) {
    throw new NullPointerException();
      } else if (!(obj instanceof ConstrainableProxy)) {
    return false;
      }
      RemoteMethodControl otherServerProxy =
    (RemoteMethodControl) ((ConstrainableProxy) obj).serverProxy;
      MethodConstraints mc = otherServerProxy.getConstraints();
      TrustEquivalence trusted =
    (TrustEquivalence) serverProxy.setConstraints(mc);
      return trusted.checkTrustEquivalence(otherServerProxy);
  }
View Full Code Here

Examples of net.jini.core.constraint.RemoteMethodControl

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

  return (OutriggerAdmin)constrainedServer;
    }
View Full Code Here

Examples of net.jini.core.constraint.RemoteMethodControl

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

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

Examples of net.jini.core.constraint.RemoteMethodControl

      new Object[] { obj, ctx });
  if (obj == null || ctx == null) {
      throw new NullPointerException("Arguments must not be null");
  }

  RemoteMethodControl otherServerProxy;
  if (obj instanceof SharedGroupBackEnd) {
      otherServerProxy = (RemoteMethodControl) obj;
  } else {
      logger.log(Level.FINEST, "Object {0} is not a supported type",
    obj);
      return false;
  }

  MethodConstraints mc = otherServerProxy.getConstraints();
  TrustEquivalence trusted =
      (TrustEquivalence) serverProxy.setConstraints(mc);
  boolean result = trusted.checkTrustEquivalence(otherServerProxy);
  logger.exiting(ProxyVerifier.class.getName(), "isTrustedObject",
      Boolean.valueOf(result));
View Full Code Here

Examples of net.jini.core.constraint.RemoteMethodControl

          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 Registration.ConstrainableRegistration) {
      Registration reg = (Registration) obj;
      // verify sub-components
      if (!isTrustedObject(reg.lease, ctx) ||
    !isTrustedObject(reg.listener, ctx)) {
    return false;
      }
      otherServerProxy = (RemoteMethodControl) reg.mailbox;
  } else if (obj instanceof MailboxBackEnd &&
             obj instanceof RemoteMethodControl) {
            /* Inner proxy verification case. To simplify logic, below,
       * just assume the same Uuid that we have in hand.
       */
      otherServerProxy = (RemoteMethodControl)obj;
      inputProxyID = proxyID;
  } else if (obj instanceof MailboxProxy.ConstrainableMailboxProxy) {
      otherServerProxy = (RemoteMethodControl) ((MailboxProxy)obj).mailbox;
      inputProxyID = ((ReferentUuid)obj).getReferentUuid();
  } else if (obj instanceof MailboxAdminProxy.ConstrainableMailboxAdminProxy) {
      otherServerProxy = (RemoteMethodControl) ((MailboxAdminProxy)obj).server;
      inputProxyID = ((ReferentUuid)obj).getReferentUuid();
  } else if (obj instanceof ListenerProxy.ConstrainableListenerProxy) {
      otherServerProxy = (RemoteMethodControl) ((ListenerProxy)obj).server;
  } else if (obj instanceof ConstrainableLandlordLease) {
      final LandlordProxyVerifier lpv =
    new LandlordProxyVerifier((Landlord)serverProxy, proxyID);
      return lpv.isTrustedObject(obj, ctx);
  } 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(proxyVerifierSourceClass, "isTrustedObject",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.