Examples of InvocationConstraints


Examples of net.jini.core.constraint.InvocationConstraints

      return constraintCache[i].makeAbsolute();
        }
    }
      }

      InvocationConstraints constraints = InvocationConstraints.combine(
    clientConstraints == null ?
        null : clientConstraints.getConstraints(method),
    serverConstraints == null ?
        null : serverConstraints.getConstraints(method));

      methodCache[cacheIndex] = method;
      constraintCache[cacheIndex] = constraints;
      cacheIndex = (cacheIndex == 0) ? CACHE_SIZE - 1 : cacheIndex - 1;
      return constraints.makeAbsolute();
  }
    }
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraints

  throws UnsupportedConstraintException
    {
  if (constraints == null)
      throw new NullPointerException();

  InvocationConstraints unfulfilledConstraints;
  try {
      // check for unsupportable constraints
      for (Iterator iter = constraints.requirements().iterator();
     iter.hasNext(); )
      {
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraints

        throw uce;
    }
      }
     
      // constraints need upper layer help to be fully fulfilled
      InvocationConstraints unfulfilledConstraints =
    InvocationConstraints.EMPTY;

      if (KerberosUtil.containsConstraint(
    constraints.requirements(), Integrity.YES))
      {
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraints

  try {
      new BasicJeriExporter(se, null);
      throw new RuntimeException("null il factory did not cause NPE");
  } catch (NullPointerException e) {
  }
  InvocationConstraints sauth =
      new InvocationConstraints(ServerAuthentication.YES, null);
  MethodConstraints samc = new BasicMethodConstraints(sauth);
  final InvocationLayerFactory ailf =
      new BasicILFactory(samc, null);
  // check that subject cannot satisfy server authentication
  BasicJeriExporter exp = new BasicJeriExporter(se, ailf);
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraints

  throws UnsupportedConstraintException
    {
  if (constraints == null) {
      constraints = InvocationConstraints.EMPTY;
  }
  return new X500Constraints(new InvocationConstraints(
      distill(constraints.requirements(), request, true),
      distill(constraints.preferences(), request, false)));
    }
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraints

        "serverConnection.checkPermissions(rh): " + e;
      }

      /* test connection.checkConstraints(...) */
      try {
    InvocationConstraints unfulfilledConstraints =
        (InvocationConstraints) runWithPerms(new Action() {
          public Object run() throws Exception {
        return info.serverConnection.checkConstraints(
            rh, serverConstraints);
          }
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraints

     * processed
     */
    public ServiceRegistrar getRegistrar(int timeout)
  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

Examples of net.jini.core.constraint.InvocationConstraints

  public Object run() throws Exception {
      final Action act = new Action() {
        public Object run() throws Exception {
      try {
          InvocationConstraints unsupportedcs =
        serverEndpoint.checkConstraints(constraints);
          if (!unsupportedcs.equals(unsupportedConstraints))
        return returnErrMsg;
          return null;
      } catch (NullPointerException e) {
          if (nullPointerExceptionErrMsg != null)
        e.printStackTrace(); // for debug
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraints

      clientSubject = getLoginSubject(clientLoginEntry);
      serverSubject = getLoginSubject(serverLoginEntry);

      InvocationConstraints[] clientConstraintsArr =
    new InvocationConstraints[] {
        new InvocationConstraints(
      new InvocationConstraint[] {
          new ClientMinPrincipal(cps[1]),
          new ClientMaxPrincipal(
        new Principal[] {cps[0], cps[1], cps[2]})},
      null),
        new InvocationConstraints(
      new InvocationConstraint[] {
          new ClientMinPrincipal(cps[1]),
          new ClientMaxPrincipal(
        new Principal[] {cps[0], cps[1]}),
          Confidentiality.YES},
      null),
        new InvocationConstraints(
      new InvocationConstraint[] {
          new ClientMinPrincipal(cps[1]),
          new ClientMaxPrincipal(
        new Principal[] {cps[1], cps[2]}),
          Delegation.YES},
      null),
        new InvocationConstraints(
      new InvocationConstraint[] {
          new ClientMinPrincipal(cps[1]),
          new ClientMaxPrincipal(
        new Principal[] {cps[1], cps[2]}),
          Delegation.YES},
      new InvocationConstraint[] {Confidentiality.YES})
      };

      InvocationConstraints serverConstraints =
    new InvocationConstraints(
        new InvocationConstraint[] {Integrity.YES},
        null);

      KerberosServerEndpoint serverEndpoint =
    KerberosServerEndpoint.getInstance(
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraints

  public boolean tryGetProxy() {
      if (proxy != null ) {
    throw new IllegalArgumentException
                                 ("LookupLocator has been discovered already");
      }
      InvocationConstraints ic = InvocationConstraints.EMPTY;
      if (l instanceof RemoteMethodControl) {
    MethodConstraints mc =
        ((RemoteMethodControl) l).getConstraints();
    if (mc != null) {
        ic = mc.getConstraints(getRegistrarMethod);
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.