Package net.jini.jeri

Examples of net.jini.jeri.BasicJeriExporter.export()


    {
  ServerEndpoint se = getServerEndpoint(host, port, new SF(), null);
  InvocationLayerFactory ilf =
      new BasicILFactory(null, null, PingImpl.class.getClassLoader());
  Exporter exporter = new BasicJeriExporter(se, ilf, false, false);
  return (Ping) exporter.export(impl);
    }

    private static void tryWithAcc(AccessControlContext acc,
           final Ping proxy,
           int expectation)
View Full Code Here


  ServerEndpoint se2 = SslServerEndpoint.getInstance(HOST, PORT);
  InvocationLayerFactory ilf = new BasicILFactory();
  Exporter e1 = new BasicJeriExporter(se1, ilf);
  Exporter e2 = new BasicJeriExporter(se2, ilf);
  e1.export(new Remote() { });
  e2.export(new Remote() { });

  Thread.currentThread().sleep(5000);

  // If we got here, success. Otherwise an exception should
  // have been thrown. (IllegalArgumentException)
View Full Code Here

   *
   * - DGC call to A should fail.
   */
  Remote implA0 = new Remote() { };
  Exporter expA0 = new BasicJeriExporter(seA, ilf, false, false);
  expA0.export(implA0);
  System.err.println("\t{A0}");

  System.err.print("DGC call to A ");
  verifyFailure(dgcA);

View Full Code Here

   * - DGC call to B should succeed.
   * - DGC call to B with foreign UUID class should fail.
   */
  Remote implB1 = new Remote() { };
  Exporter expB1 = new BasicJeriExporter(seB, ilf, true, false);
  expB1.export(implB1);
  System.err.println("\t{A0}\t{B1}");

  System.err.print("DGC call to A ");
  verifyFailure(dgcA);
  System.err.print("DGC call to B ");
View Full Code Here

   *
   * - DGC call to A should now succeed.
   */
  Remote implA1 = new Remote() { };
  Exporter expA1 = new BasicJeriExporter(seA, ilf, true, false);
  expA1.export(implA1);
  System.err.println("\t{A0,A1}\t{B1}");

  System.err.print("DGC call to A ");
  verifySuccess(dgcA);

View Full Code Here

   * - DGC call to B should now fail.
   */

  Remote implB0 = new Remote() { };
  Exporter expB0 = new BasicJeriExporter(seB, ilf, false, false);
  expB0.export(implB0);
  System.err.println("\t{A0}\t{B0,B1}");

  implB1 = null;
  System.gc();
  Thread.sleep(3000);
View Full Code Here

  CountedSocketFactory csf = new CountedSocketFactory();
  Exporter exporter = new BasicJeriExporter(
      HttpServerEndpoint.getInstance(null, 0, csf, null),
      new BasicILFactory());
  EchoImpl impl = new EchoImpl();
  Echo stub = (Echo) exporter.export(impl);

  try {
      final int REPS = 3;
      for (int i = 0; i < REPS; i++) {
    if (stub.echo(i) != i) {
View Full Code Here

                PORT);
  InvocationLayerFactory ilf = new BasicILFactory();
  Exporter e1 = new BasicJeriExporter(se1, ilf, false, false);
  Exporter e2 = new BasicJeriExporter(se2, ilf, false, false);
  e1.export(new Remote() { });
  e2.export(new Remote() { });
    }
}
View Full Code Here

      System.err.println("created registry");

      Exporter exporterA =
    new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
              new BasicILFactory(), true, false);
      Remote stubA = exporterA.export(obj);
      System.err.println("exported remote object once");

      Exporter exporterB =
    new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
              new BasicILFactory(), true, false);
View Full Code Here

      System.err.println("exported remote object once");

      Exporter exporterB =
    new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
              new BasicILFactory(), true, false);
      Remote stubB = exporterB.export(obj);
      System.err.println("exported remote object twice");

      Exporter exporterC =
    new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
              new BasicILFactory(), false, 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.