Package net.jini.core.constraint

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


        /*
         * 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

  throws IOException, ClassNotFoundException
    {
  InvocationConstraints ic = (constraints != null) ?
      constraints.getConstraints(getRegistrarTimeoutMethod) :
      InvocationConstraints.EMPTY;
  Collection reqs = new ArrayList(ic.requirements());
  reqs.add(new UnicastSocketTimeout(timeout));
  return getRegistrar(new InvocationConstraints(reqs, ic.preferences()));
    }

    /**
 
View Full Code Here

           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

    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

       * non-Integrity unfulfilled requirements, we cannot
       * satisfy them, so this request attempt must fail.
       */
      InvocationConstraints unfulfilled =
    request.getUnfulfilledConstraints();
      for (Iterator i = unfulfilled.requirements().iterator();
     i.hasNext();)
      {
    InvocationConstraint c = (InvocationConstraint) i.next();
    if (c == Integrity.YES) {
        integrity = true;
View Full Code Here

  throws IOException, ClassNotFoundException
    {
  InvocationConstraints ic = (constraints != null) ?
      constraints.getConstraints(getRegistrarTimeoutMethod) :
      InvocationConstraints.EMPTY;
  Collection reqs = new ArrayList(ic.requirements());
  reqs.add(new UnicastSocketTimeout(timeout));
  return getRegistrar(new InvocationConstraints(reqs, ic.preferences()));
    }

    /**
 
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.