Package net.jini.core.constraint

Examples of net.jini.core.constraint.InvocationConstraints.requirements()


           InvocationConstraints constraints)
  throws UnsupportedConstraintException
    {
  InvocationConstraints unfulfilled =
      serverCapabilities.checkConstraints(constraints);
  for (Iterator i = unfulfilled.requirements().iterator(); i.hasNext();)
  {
      InvocationConstraint c = (InvocationConstraint) i.next();
      if (!(c instanceof Integrity)) {
    throw new UnsupportedConstraintException(
        "cannot satisfy unfulfilled constraint: " + c);
View Full Code Here


      method = unmarshalMethod(impl, in, context);
      InvocationConstraints sc =
    (serverConstraints == null ?
     InvocationConstraints.EMPTY :
     serverConstraints.getConstraints(method));
      if (integrity && !sc.requirements().contains(Integrity.YES)) {
    Collection requirements = new ArrayList(sc.requirements());
    requirements.add(Integrity.YES);
    sc = new InvocationConstraints(requirements, sc.preferences());
      }
     
View Full Code Here

      InvocationConstraints sc =
    (serverConstraints == null ?
     InvocationConstraints.EMPTY :
     serverConstraints.getConstraints(method));
      if (integrity && !sc.requirements().contains(Integrity.YES)) {
    Collection requirements = new ArrayList(sc.requirements());
    requirements.add(Integrity.YES);
    sc = new InvocationConstraints(requirements, sc.preferences());
      }
     
      InvocationConstraints unfulfilled = request.checkConstraints(sc);
View Full Code Here

        InvocationConstraints c = null;
        c = iface.getConstraints().getConstraints(testMethod.getMethod());
        logger.log(CLIENTCONSTRAINTS, "client constraints from proxy: " + c);
        Collection imposedRequirements = new ArrayList(    // need mutable set
            clientConstraints.requirements());
        Set observedRequirements = c.requirements();
        Iterator it = observedRequirements.iterator();
        while (it.hasNext()) {
            Object obj = it.next();
            if (!imposedRequirements.contains(obj)) {
                logFailure("unexpected client constraint " + obj + " "
View Full Code Here

            "Entering checkCombinedConstraints(method, context)");
        logger.log(COMBINEDCONSTRAINTS,
            "combined constraints: " + combinedConstraints);
        InvocationConstraints sc = method.parseConstraints();
        sc = InvocationConstraints.combine(sc, clientConstraints);
        Set imposedRequirements = sc.requirements();
        /* combined requirements must be mutable */
        Set combinedRequirements =
        new HashSet(combinedConstraints.requirements());
        Iterator it = imposedRequirements.iterator();
        while (it.hasNext()) {
View Full Code Here

    requirements.add(Integrity.YES);
    sc = new InvocationConstraints(requirements, sc.preferences());
      }
     
      InvocationConstraints unfulfilled = request.checkConstraints(sc);
      for (Iterator i = unfulfilled.requirements().iterator();
     i.hasNext();)
      {
    InvocationConstraint c = (InvocationConstraint) i.next();
    if (!(c instanceof Integrity) ||
        (!integrity && c == Integrity.YES))
View Full Code Here

        /*
         * Verify that the first constraint, req, is added as a requirement
         * if it is a non-null value.
         */
        Set reqs = ic.requirements();

        if (req == null) {
            if (!reqs.isEmpty()) {
                String s = "Expected that no requirement has been added when"
                        + " req is null; Really requirements aren't empty";
View Full Code Here

        /*
         * Verify that the first constraint, req, is added as a requirement
         * if it is a non-null value.
         */
        Set reqs = ic.requirements();

        if (req == null) {
            if (!reqs.isEmpty()) {
                String s = "Expected that no requirement has been added when"
                        + " req is null; Really requirements aren't empty";
View Full Code Here

        /*
         * Verify that the first constraint, req, is added as a requirement
         * if it is a non-null value.
         */
        Set reqs = ic.requirements();

        if (req == null) {
            if (!reqs.isEmpty()) {
                String s = "Expected that no requirement has been added when"
                        + " req is null; Really requirements aren't empty";
View Full Code Here

            /*
             * Get requirements from the created InvocationConstraints object
             * and compare with the requirements specified while creation of
             * this object.
             */
            Set r = ic.requirements();
            logger.log(Level.FINE,
                    "reqs in InvocationConstraints object:: " + r);

            if (!reqs.equals(r)) {
                return false;
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.