Package net.jini.jrmp

Examples of net.jini.jrmp.JrmpExporter.export()


      throw new Error();
  } catch (ServerNotActiveException ex) {
  }

  JrmpExporter exporter = new JrmpExporter();
  Foo stub = (Foo) exporter.export(impl);
  String clientHost = stub.getClientHost();
  System.out.println("Returned client host: " + clientHost);
  if (clientHost == null) {
      throw new Error("clientHost is null");
  }
View Full Code Here


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

View Full Code Here

        } else {
            // PASS
            logger.log(Level.FINE, "Method returned true as expected.");
        }
        JrmpExporter je2 = createJrmpExporter();
        je2.export(tro);
        logger.log(Level.FINE,
                "Invoke unexport method of constructed"
                + " JrmpExporter2 with 'false' value...");
        uRes = je2.unexport(false);
View Full Code Here

        } else {
            // PASS
            logger.log(Level.FINE, "Method returned true as expected.");
        }
        JrmpExporter je3 = createJrmpExporter();
        TestRemoteInterface stub = (TestRemoteInterface) je3.export(tro);
        Unexporter u = new Unexporter(je3, false);
        logger.log(Level.FINE,
                "Start thread which will invoke unexport method"
                + " of constructed JrmpExporter3 with 'false' value...");
        u.start();
View Full Code Here

    public void run() throws Exception {
        JrmpExporter je = createJrmpExporter();
        TestRemoteObjectWithoutStub trows = new TestRemoteObjectWithoutStub();

        try {
            je.export(trows);

            // FAIL
            throw new TestException(
                    "Export method invocation with remote object"
                    + " without stub class does not produce any"
View Full Code Here

     */
    public void run() throws Exception {
        JrmpExporter je = createJrmpExporter();
        TestRemoteObject tro1 = new TestRemoteObject("TestObject1");
        TestRemoteObject tro2 = new TestRemoteObject("TestObject2");
        je.export(tro1);

        try {
            je.export(tro1);

            // FAIL
View Full Code Here

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

        try {
            je.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 {
            je.export(tro2);

            // FAIL
            throw new TestException("IllegalStateException has not been thrown "
                    + "during invocation of export method with another"
                    + tro2 + " as a parameter.");
View Full Code Here

     */
    public void run() throws Exception {
        JrmpExporter je = createJrmpExporter();

        try {
            je.export(null);

            // FAIL
            throw new TestException("NullPointerException has not been thrown "
                    + "during invocation of export method with "
                    + "null as a parameter.");
View Full Code Here

        ie.unexport(true);

        // step 3
        JrmpExporter je = createJrmpExporter();
        tro = new TestRemoteObject();
        stub = (TestRemoteInterface) je.export(tro);

        if (!stub.checkGetServerContext().booleanValue()) {
            // FAIL
            throw new TestException(
                    "Result of getServerContext invocation when there is a "
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.