Package net.jini.jeri

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


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

      Exporter exporterC =
    new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
              new BasicILFactory(), false, false);
      Remote stubC = exporterC.export(obj);
      System.err.println("exported remote object thrice");

      Registry registry = LocateRegistry.getRegistry(
    "", TestLibrary.REGISTRY_PORT);
View Full Code Here


        BasicJeriExporter exporter = getExporter();
        handler.setExporter(exporter); // needed so it can do the unexport
        if (exporter != null) {
      if (service == null) {
    service = (Remote) createProxy(handler);
    stub = exporter.export(service);
      }
            SmartProxy sp = new SmartProxy(stub, coordinator);
            try {
                obj = new MarshalledObject(sp);
            } catch (IOException e) {
View Full Code Here

      CallbackImpl cb = new CallbackImpl();
      BasicJeriExporter basicExporter =
    new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
              new BasicILFactory(), true, true);
      MarshalledObject mo =
    new MarshalledObject(basicExporter.export(cb));
      Properties props = new Properties();
      props.put("java.security.policy",
          TestParams.testSrc + File.separator +
          "group.security.policy");
      ActivationGroupID gid =
View Full Code Here

    {
  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

  Exporter exporter =
      new BasicJeriExporter(TcpServerEndpoint.getInstance(0), new
          BasicILFactory(), true, true);

  try {
      verifySuppression((Pong) exporter.export(new Impl()));

      System.err.println(
    "TEST PASSED (server-side stack trace data suppressed)");
  } finally {
      try {
View Full Code Here

      new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
          new TestILFactory(), false, true);
  RemoteInterface proxy = null;
 
  try {
      proxy = (RemoteInterface) exporter.export(impl);
      try {
    proxy.throwIt(new RuntimeException());
      } catch (RuntimeException e) {
    System.err.println("caught RuntimeException");
      }
View Full Code Here

  Exporter exporter =
      new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
          new BasicILFactory(), true, true);
 
  try {
      Ping stub = (Ping) exporter.export(new ServerStackTrace());

      StackTraceElement[] remoteTrace;
      try {
    __FOO__(stub);
    throw new RuntimeException("TEST FAILED: no exception caught");
View Full Code Here

  Impl impl = new Impl();
  Exporter exporter = new BasicJeriExporter(
      TcpServerEndpoint.getInstance(null, 0, null,
            new DelayingServerSocketFactory()),
      new BasicILFactory());
  Ping stub = (Ping) exporter.export(impl);

  new Thread(new Unexporter(exporter)).start();

  try {
      stub.ping();
View Full Code Here

  ServerEndpoint se =
      TcpServerEndpoint.getInstance(null, 0, sf, ssf);
  InvocationLayerFactory ilf =
      new BasicILFactory(null, null, PingImpl.class.getClassLoader());
  Exporter exporter = new BasicJeriExporter(se, ilf, false, false);
  Ping proxy = (Ping) exporter.export(impl);
  /*
   * Create this object early to avoid possible FuturePing
   * verification failure when new threads cannot be created.
   */
  FuturePing future = new FuturePing(proxy);
View Full Code Here

  ServerEndpoint se =
      TcpServerEndpoint.getInstance("localhost", 0, sf, ssf);
  InvocationLayerFactory ilf =
      new BasicILFactory(null, null, PingImpl.class.getClassLoader());
  Exporter exporter = new BasicJeriExporter(se, ilf, false, false);
  Ping proxy = (Ping) exporter.export(impl);
  /*
   * Create another proxy that will use a different connection
   * than the first (SocketFactory does not override equals).
   */
  Ping proxy2 = (Ping) (new MarshalledInstance(proxy)).get(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.