Package net.jini.constraint

Examples of net.jini.constraint.BasicMethodConstraints


          (MethodConstraints) config.getEntry(
        "test", "discoveryConstraints",
        MethodConstraints.class, null);
      if (discoveryConstraints == null) {
          discoveryConstraints =
        new BasicMethodConstraints(InvocationConstraints.EMPTY);
      }
      try {
          multicastRequestSubjectChecker =
        (ClientSubjectChecker) Config.getNonNullEntry(
            config, "test", "multicastRequestSubjectChecker",
View Full Code Here


      (MethodConstraints) config.getEntry(COMPONENT,
            "discoveryConstraints",
            MethodConstraints.class, null);
  if (discoveryConstraints == null) {
      discoveryConstraints =
    new BasicMethodConstraints(InvocationConstraints.EMPTY);
  }
  try {
      discoer = (DiscoveryManagement) config.getEntry(
    COMPONENT, "discoveryManager", DiscoveryManagement.class);
  } catch (NoSuchEntryException e) {
View Full Code Here

                 "discoveryConstraints",
                 MethodConstraints.class,
                 null);
  if (constraints == null) {
      constraints =
    new BasicMethodConstraints(InvocationConstraints.EMPTY);
  }
  multicastRequestConstraints = DiscoveryConstraints.process(
      constraints.getConstraints(
    DiscoveryConstraints.multicastRequestMethod));
  multicastAnnouncementConstraints = DiscoveryConstraints.process(
View Full Code Here

    clientConstraints.getConstraints(method);
      InvocationConstraints absoluteConstraints =
    relativeConstraints.makeAbsolute();
      if (relativeConstraints != absoluteConstraints) {
    convertedConstraints =
        new BasicMethodConstraints(absoluteConstraints);
      }
  }
 
  boolean force = false;
  Remote currProxy;
View Full Code Here

                 "discoveryConstraints",
                 MethodConstraints.class,
                 null);
  if (constraints == null) {
      constraints =
    new BasicMethodConstraints(InvocationConstraints.EMPTY);
  }
  multicastRequestConstraints = DiscoveryConstraints.process(
      constraints.getConstraints(
    DiscoveryConstraints.multicastRequestMethod));
  multicastAnnouncementConstraints = DiscoveryConstraints.process(
View Full Code Here

      (MethodConstraints) config.getEntry(COMPONENT,
            "discoveryConstraints",
            MethodConstraints.class, null);
  if (discoveryConstraints == null) {
      discoveryConstraints =
    new BasicMethodConstraints(InvocationConstraints.EMPTY);
  }
  try {
      discoer = (DiscoveryManagement) config.getEntry(
    COMPONENT, "discoveryManager", DiscoveryManagement.class);
  } catch (NoSuchEntryException e) {
View Full Code Here

      Collections.singleton(new X500Principal("CN=bob")),
      Collections.EMPTY_SET, Collections.EMPTY_SET);
  final SslServerEndpoint se =
      SslServerEndpoint.getInstance(s, null, null, 0);
  final MethodConstraints nomc =
      new BasicMethodConstraints(InvocationConstraints.EMPTY);
  final InvocationLayerFactory uilf =
      new BasicILFactory(nomc, null);
  // check that null server endpoint throws NPE
  try {
      new BasicJeriExporter(null, uilf);
      throw new RuntimeException("null endpoint did not cause NPE");
  } catch (NullPointerException e) {
  }
  // check that null il factory throws NPE
  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);
  try {
View Full Code Here

    serverSubject, null, null, 0, null, null);
     
      serverExporter = new BasicJeriExporter(
    serverEndpoint,
    new BasicILFactory(
        new BasicMethodConstraints(serverConstraints),
        ServerPermission.class));
      server = new Server();
      Hello serverProxy = (Hello) serverExporter.export(server);

      KerberosPrincipal cp = cps[1];
      helloProxies = new Hello[clientConstraintsArr.length];
      for (int i = 0; i < clientConstraintsArr.length; i++) {
    BasicProxyPreparer preparer = new BasicProxyPreparer(
        true,
        new BasicMethodConstraints(clientConstraintsArr[i]),
        null);
    helloProxies[i] = (Hello) preparer.prepareProxy(serverProxy);
      }
      initTests(initRuns, repeatRuns);
      initOk = true;
View Full Code Here

      (MethodConstraints) config.getEntry(COMPONENT,
            "discoveryConstraints",
            MethodConstraints.class, null);
  if (discoveryConstraints == null) {
      discoveryConstraints =
    new BasicMethodConstraints(InvocationConstraints.EMPTY);
  }
  try {
      discoer = (DiscoveryManagement) config.getEntry(
    COMPONENT, "discoveryManager", DiscoveryManagement.class);
  } catch (NoSuchEntryException e) {
View Full Code Here

                    }
                    flags >>= 1;
                }
                clientConstraints = new InvocationConstraints(reqList, prefList);
                ui.setClientProxyConstraints(clientConstraints);
                BasicMethodConstraints mc =
                    new BasicMethodConstraints(clientConstraints);
                try {
                    currentMethod =
                    new TestMethod(Security.class.getMethod("verifyObjectTrust",
                        new Class[]{ Object.class,
                        ClassLoader.class, Collection.class}));
View Full Code Here

TOP

Related Classes of net.jini.constraint.BasicMethodConstraints

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.