Package net.jini.core.constraint

Examples of net.jini.core.constraint.MethodConstraints


      }
      Remote newProxy;
      synchronized (this) {
    newProxy = uproxy;
      }
      MethodConstraints mc = (MethodConstraints) args[0];
      if (newProxy instanceof RemoteMethodControl) {
    newProxy = (Remote)
        ((RemoteMethodControl) newProxy).setConstraints(mc);
      }
      Class proxyClass = proxy.getClass();
View Full Code Here


  /*
   * Make the relative constraints (if any) on the method absolute.
   * If there are relative constraints, create new method constraints
   * to set on the underlying proxy before invoking a method.
   */
  MethodConstraints convertedConstraints = null;
  if (clientConstraints != null) {
      InvocationConstraints relativeConstraints =
    clientConstraints.getConstraints(method);
      InvocationConstraints absoluteConstraints =
    relativeConstraints.makeAbsolute();
View Full Code Here

                inputProxy = (RemoteMethodControl)obj;
                inputProxyID = proxyID;
            } else {
                return false;
            }//endif
            final MethodConstraints mConstraints = inputProxy.getConstraints();
            final TrustEquivalence constrainedInnerProxy =
                     (TrustEquivalence)innerProxy.setConstraints(mConstraints);
            return (    constrainedInnerProxy.checkTrustEquivalence(inputProxy)
                     && proxyID.equals(inputProxyID) );
        }//end isTrustedObject
View Full Code Here

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

View Full Code Here

            inputProxyID = proxyID;
        } else {
            return false;
        }//endif
        /* Get the client constraints currently set on the input proxy */
        final MethodConstraints mConstraints
                                        = inputProxy.getConstraints();
        /* Create a copy of the canonical proxy with its method constraints
         * replaced with the method constraints of the input proxy.
         */
        final TrustEquivalence constrainedInnerProxy =
View Full Code Here

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

View Full Code Here

    {
  if (handler == null) {
      throw new NullPointerException("handler is null");
  }

  MethodConstraints serverConstraints = handler.getServerConstraints();
  return (ctx.isTrustedObject(handler.getObjectEndpoint()) &&
    ctx.isTrustedObject(serverConstraints));
    }
View Full Code Here

     */
    protected void verify(Object proxy) throws RemoteException {
  if (proxy == null) {
      throw new NullPointerException("Proxy cannot be null");
  } else if (verify) {
      MethodConstraints mc = getMethodConstraints(proxy);
      Security.verifyObjectTrust(proxy, null,
               (mc == null
          ? Collections.EMPTY_SET
          : Collections.singleton(mc)));
  }
View Full Code Here

     *         does not implement <code>RemoteMethodControl</code>.
     */
    private static OutriggerAdmin constrainServer(OutriggerAdmin server,
        MethodConstraints constraints)
    {
  final MethodConstraints serverRefConstraints
      = ConstrainableProxyUtil.translateConstraints(constraints,
                methodMapArray);
  final RemoteMethodControl constrainedServer =
      ((RemoteMethodControl)server).
      setConstraints(serverRefConstraints);
View Full Code Here

        ProxyTrustInvocationHandler ptih = createPTIH(main, boot);
        Object proxy = ProxyTrustUtil.newProxyInstance(
                new RMCTEImpl(), ptih);
        Method m = RemoteMethodControl.class.getDeclaredMethod(
                "setConstraints", new Class[] { MethodConstraints.class });
        MethodConstraints mc = new BasicMethodConstraints(
                new InvocationConstraints(
                    new InvocationConstraint[] { ClientAuthentication.YES },
                    null));
        Object res = ptihInvoke(ptih, proxy, m, new Object[] { mc });
View Full Code Here

TOP

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

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.