Package net.jini.jeri

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


   * Unexport A1.
   *
   * - DGC call to A should fail again.
   * - DGC call to B should still succeed.
   */
  expA1.unexport(true);
  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


      csf.clientSocketsCreated + " instead of " +
      expectedSocketsCreated);
    }
      }
  } finally {
      exporter.unexport(true);
  }
    }

    private static void sleep(long millis) {
  long now = System.currentTimeMillis();
View Full Code Here

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

        "UnexpectedException has correct nested exception");
      }
      System.err.println("test passed");
  } finally {
      if (proxy != null) {
    exporter.unexport(true);
      }
  }
    }
}
View Full Code Here

       "before server-side method __BAR__");
      }
      System.err.println("TEST PASSED");
  } finally {
      try {
    exporter.unexport(true);
      } catch (Exception e) {
      }
  }
    }
}
View Full Code Here

            + ".basicjeriexporter.listenPort", 9090);
        BasicJeriExporter exporter = new BasicJeriExporter(
            TcpServerEndpoint.getInstance(listenPort), new BJETestILFactory());
        try {
            //Call unexport on the exporter instance
            exporter.unexport(true);
            throw new TestException("Unexporting with an unused"
                    + "exporter does not cause an exception to be thrown");
        } catch (IllegalStateException e) {
            //Verify that in IllegalStateException is thrown
        }
View Full Code Here

        Integer port = new Integer(getStringValue("listenPort"));
        BasicJeriExporter exporter = new BasicJeriExporter(
            TcpServerEndpoint.getInstance(port.intValue()),
      new BasicILFactory());
        Remote stub = exporter.export(new TestServiceImpl());
  exporter.unexport(true);
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        TestTrustVerifierCtx ctx = new TestTrustVerifierCtx(
            true, loader);
        if (!verifier.isTrustedObject(stub, ctx)){
            throw new TestException("Returned false for an"
View Full Code Here

            e.printStackTrace();
            throw new TestException(e.getMessage(),e);
        }
        //Make a remote call that returns something
        stub.doSomething();
        exporter.unexport(true);
        rd.stop();
        //Extract and analyze the messages sent by the mux server
        try {
            analyzeServerDataBytes(rd.getServerConversation());
        } catch (ProtocolException 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
  implements ServerEndpoint
View Full Code Here

        BJETestServiceImpl service = new BJETestServiceImpl();
        //export a remote object using the exporter
        try {
            exporter.export(service);
            //call the unexport method with the force flag set to false
            boolean result = exporter.unexport(false);
            if (result) {
                //verify that close was called on the server endpoint
                if (closeCalled) {
                    //OK
                } else {
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.