Package net.jini.export

Examples of net.jini.export.Exporter


            ldm = new LookupDiscoveryManager(groupsToJoin, locatorsToJoin,
                                             null, config);

            ServerEndpoint endpoint = TcpServerEndpoint.getInstance(0);
            InvocationLayerFactory ilFactory = new BasicILFactory();
            Exporter defaultExporter = new BasicJeriExporter(endpoint,
                                                             ilFactory,
                                                             false,
                                                             true);
            if(activationID != null) {
                ProxyPreparer aidPreparer =
View Full Code Here


     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        ProxyTrustExporter pte;
        Exporter be = new ValidBootExporter();
        Remote sre = new SPTRemoteObject();
        Exporter[] exp = new Exporter[] {
            new TENonRMCMainExporter(),
            new RMCNonTEMainExporter(),
            new RMCTENonPublicIntMainExporter(),
            new ExportExceptionExporter() };

        for (int i = 0; i < exp.length; ++i) {
            pte = createPTE(exp[i], be);

            try {
                pte.export(sre);

                // FAIL
                throw new TestException(
                        "export(" + sre + ") method of constructed "
                        + "ProxyTrustExporter did not throw any exception "
                        + "while ExportException was expected.");
            } catch (ExportException ee) {
                // PASS
                logger.fine("export(" + sre + ") method of constructed "
                        + "ProxyTrustExporter threw ExportException "
                        + "as expected.");
            }
        }
        Exporter me = new ValidMainExporter();
        exp = new Exporter[] {
            new RMCTENonPTBootExporter(),
            new PTTENonRMCBootExporter(),
            new RMCPTNonTEBootExporter(),
            new ExportExceptionExporter() };
View Full Code Here

    /**
     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        Exporter me = new ValidMainExporter();
        Exporter be = new ISEExporter();
        Remote ro = new SPTRemoteObject();
        ProxyTrustExporter pte = createPTE(me, be);

        try {
            pte.export(ro);
View Full Code Here

    /**
     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        Exporter me = new ValidMainExporter();
        Exporter be = new IAEExporter();
        Remote ro = new SPTRemoteObject();
        ProxyTrustExporter pte = createPTE(me, be);

        try {
            pte.export(ro);
View Full Code Here

    /**
     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        Exporter me = new ValidMainExporter();
        Exporter be = new ValidBootExporter();

        try {
            createPTE(me, null);

            // FAIL
View Full Code Here

    private long maxSeqNum = 0;
    private Object proxy;

    public SimpleEventListener(Configuration c) throws RemoteException {
  try {
      Exporter exporter = QAConfig.getDefaultExporter();
      if (c instanceof com.sun.jini.qa.harness.QAConfiguration) {
    exporter =
    (Exporter) c.getEntry("test", "outriggerListenerExporter", Exporter.class);
      }
      proxy = exporter.export(this);
  } catch (ConfigurationException e) {
      throw new IllegalArgumentException("Bad configuration" + e);
  }
    }
View Full Code Here

        }

        /* Handle items and duties related to exporting this service. */
        ServerEndpoint endpoint = TcpServerEndpoint.getInstance(0);
        InvocationLayerFactory ilFactory = new BasicILFactory();
        Exporter defaultExporter = new BasicJeriExporter(endpoint,
                                                         ilFactory,
                                                         false,
                                                         true);
        /* For the activatable server */
        if(activationID != null) {
View Full Code Here

          getPreparer(config, "systemPreparer");
      monPreparer = getPreparer(config,
              "monitorPreparer");
      TcpServerEndpoint se =
          TcpServerEndpoint.getInstance(0);
      Exporter defaultExporter =
          new BasicJeriExporter(se, new AccessILFactory());
      exporter = (Exporter) config.getEntry(
        PHOENIX, "instantiatorExporter",
        Exporter.class, defaultExporter);
      if (exporter == null) {
View Full Code Here

  aid = id;
  if (mobj != null) {
      Callback cb = (Callback) mobj.get();
      cb.activated();
  }
  Exporter basicExporter =
      new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
          new BasicILFactory(), false, true);
  exporter = new ActivationExporter(id, basicExporter);
  stub = exporter.export(this);
    }
View Full Code Here

   * when run with jtreg on Windows XP-- see 4910382).
   */
  (new java.security.SecureRandom()).nextInt();

  RuntimeThreadInheritanceLeak obj = new RuntimeThreadInheritanceLeak();
  Exporter exporter = null;

  try {
      ClassLoader loader = URLClassLoader.newInstance(new URL[0]);
      ReferenceQueue refQueue = new ReferenceQueue();
      Reference loaderRef = new WeakReference(loader, refQueue);
      System.err.println("created loader: " + loader);

      Thread.currentThread().setContextClassLoader(loader);
      exporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
               new BasicILFactory(), true, true);
      exporter.export(obj);
      Thread.currentThread().setContextClassLoader(
    ClassLoader.getSystemClassLoader());
      System.err.println(
    "exported remote object with loader as context class loader");

      loader = null;
      System.err.println("nulled strong reference to loader");

      exporter.unexport(true);
      System.err.println("unexported remote object");
      exporter = null;    // required to work around 4403470

      /*
       * HACK: Work around the fact that the sun.misc.GC daemon thread
       * also has this bug-- it will have inherited our loader as its
       * context class loader-- by giving it a chance to pass away.
       */
      Thread.sleep(1000);
      System.gc();

      System.err.println(
    "waiting to be notified of loader being weakly reachable...");
      Reference dequeued = refQueue.remove(TIMEOUT);
      if (dequeued == null) {
    System.err.println(
                    "TEST FAILED: loader not deteced weakly reachable");
    throw new RuntimeException(
                    "TEST FAILED: loader not detected weakly reachable");
      }

      System.err.println(
    "TEST PASSED: loader detected weakly reachable");

  } catch (RuntimeException e) {
      throw e;
  } catch (Exception e) {
      throw new RuntimeException("TEST FAILED: unexpected exception", e);
  } finally {
      try {
    exporter.unexport(true);
      } catch (Exception e) {
      }
  }
    }
View Full Code Here

TOP

Related Classes of net.jini.export.Exporter

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.