Package net.jini.export

Examples of net.jini.export.Exporter.export()


  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

     * effect.
     */
    protected void initAsSubject() throws Exception {
  /* Export the server */
  Exporter exporter = getExporter();
  serverProxy = (Hello) exporter.export(this);

  /* Create the smart proxy */
  Proxy smartProxy = Proxy.create(serverProxy);

  /* Get the discovery manager, for discovering lookup services */
 
View Full Code Here

  Exporter exporter = null;

  try {
      exporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
               new BasicILFactory(), true, true);
      Remote stub = exporter.export(obj);
      System.err.println("exported remote object");

      MarshalledObject mobj = new MarshalledObject(stub);
      Remote unmarshalledStub = (Remote) mobj.get();
      System.err.println("unmarshalled stub from marshalled object");
View Full Code Here

  } else {
            exporter = (Exporter) c.getEntry("test",
                                             "reliabilityExporter",
                                             Exporter.class);
  }
  stub = (OrangeEcho) exporter.export(this);
  return stub;
    }

    /**
     * Call back on supplied "orange" object (presumably the caller)
View Full Code Here

  } else {
            exporter = (Exporter) c.getEntry("test",
                                             "reliabilityExporter",
                                             Exporter.class);
  }
  stub = (Orange) exporter.export(this);
  return stub;
    }

    /**
     * Return inverted message data, call through supplied OrangeEcho
View Full Code Here

  } else {
            exporter = (Exporter) c.getEntry("test",
                                             "reliabilityExporter",
                                             Exporter.class);
  }
  stub = (Apple) exporter.export(this);
  return stub;
    }

    /**
     * Receive an array of AppleEvent objects.
View Full Code Here

             Exporter.class);
      } catch (ConfigurationException e) {
    throw new RemoteException("Configuration Error", e);
      }
  }
  proxy = exporter.export(this);
        maxEvNum = 0;
        this.template = template;
        this.leaseTime = leaseTime;
    }
View Full Code Here

      public void run() {
    Exporter exporter =
        new BasicJeriExporter(new BlockingListenServerEndpoint(),
            new BasicILFactory(), false, false);
    try {
        exporter.export(new Remote() { });
    } catch (ExportException e) {
        throw new Error(e);
    }
      }
  });
View Full Code Here

      }
  }
  Exporter exporter =
      new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
          new BasicILFactory(), false, false);
  exporter.export(new Remote() { });
  exporter.unexport(true);
  System.err.println("TEST PASSED");
    }

    private static class BlockingListenServerEndpoint
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.