Package net.jini.iiop

Examples of net.jini.iiop.IiopExporter.export()


      try { Thread.sleep(1000); } catch (InterruptedException ex) {}

      InitialContext context = new InitialContext();
      IiopExporter exporter = new IiopExporter();
      EchoImpl impl = new EchoImpl();
      context.bind("echo", exporter.export(impl));
      Echo stub = (Echo) context.lookup("echo");

      for (int i = 0; i < REPS; i++) {
    if (stub.echo(i) != i) {
        throw new Error();
View Full Code Here


    public static void main(String[] args) throws Exception {
  final int REPS = 100;
  ORB orb = ORB.init(new String[0], null);
  IiopExporter exporter = new IiopExporter(orb);
  EchoImpl impl = new EchoImpl();
  Echo stub = (Echo) exporter.export(impl);
  for (int i = 0; i < REPS; i++) {
      if (stub.echo(i) != i) {
    throw new Error();
      }
  }
View Full Code Here

     */
    public void run() throws Exception {
        IiopExporter ie = createIiopExporter();
        TestRemoteObject tro1 = new TestRemoteObject("TestObject1");
        TestRemoteObject tro2 = new TestRemoteObject("TestObject2");
        ie.export(tro1);

        try {
            ie.export(tro1);

            // FAIL
View Full Code Here

        TestRemoteObject tro1 = new TestRemoteObject("TestObject1");
        TestRemoteObject tro2 = new TestRemoteObject("TestObject2");
        ie.export(tro1);

        try {
            ie.export(tro1);

            // FAIL
            throw new TestException(
                    "IllegalStateException has not been thrown during "
                    + "second invocation of export method with the same "
View Full Code Here

                    + "second invocation of export method with the same "
                    + tro1 + " as a parameter as expected.");
        }

        try {
            ie.export(tro2);

            // FAIL
            throw new TestException(
                    "IllegalStateException has not been thrown "
                    + "during invocation of export method with another"
View Full Code Here

        // unexport test object
        ie.unexport(true);

        try {
            ie.export(tro2);

            // FAIL
            throw new TestException(
                    "IllegalStateException has not been thrown "
                    + "during invocation of export method after unexport "
View Full Code Here

     */
    public void run() throws Exception {
        IiopExporter ie = createIiopExporter();

        try {
            ie.export(null);

            // FAIL
            throw new TestException(
                    "NullPointerException has not been thrown "
                    + "during invocation of export method with "
View Full Code Here

        TestRemoteObject tro = new TestRemoteObject();
        TestRemoteInterface stub;
        logger.log(Level.FINE,
                "Invoke export method of constructed IiopExporter with "
                + tro + " object as a parameter.");
        stub = (TestRemoteInterface) ie.export(tro);

        // PASS
        logger.log(Level.FINE,
                "Export method did not throw any exceptions "
                + "as expected.");
View Full Code Here

     *
     */
    public void run() throws Exception {
        IiopExporter ie1 = createIiopExporter();
        TestRemoteObject tro = new TestRemoteObject();
        ie1.export(tro);
        logger.log(Level.FINE,
                "Invoke unexport method of constructed"
                + " IiopExporter1 with 'true' value...");
        boolean uRes = ie1.unexport(true);

View Full Code Here

        } else {
            // PASS
            logger.log(Level.FINE, "Method returned true as expected.");
        }
        IiopExporter ie2 = createIiopExporter();
        ie2.export(tro);
        logger.log(Level.FINE,
                "Invoke unexport method of constructed"
                + " IiopExporter2 with 'false' value...");
        uRes = ie2.unexport(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.