Package java.rmi.server

Examples of java.rmi.server.ExportException


     */
    @Override
    protected void setUp() {
        errorMessage = "Connectin Error";
        causeMessage = "Caused Exception";
        cause = new ExportException(causeMessage);
    }
View Full Code Here


    /**
     * @tests java.rmi.server.ExportException#ExportException(String)
     */
    public void test_Constructor_String() {
        ExportException e = new ExportException(errorMessage);
        assertTrue(e instanceof java.rmi.RemoteException);
        assertEquals(errorMessage, e.getMessage());
    }
View Full Code Here

    /**
     * @tests java.rmi.server.ExportException#ExportException(String,Exception)
     */
    public void test_Constructor_String_Exception() {
        ExportException e = new ExportException(errorMessage, cause);
        assertEquals(cause.getMessage(), e.getCause().getMessage());
    }
View Full Code Here

    /**
     * @tests serialization/deserialization.
     */
    public void testSerializationSelf() throws Exception {

        SerializationTest.verifySelf(new ExportException(errorMessage, cause), comparator);
    }
View Full Code Here

    /**
     * @tests serialization/deserialization compatibility with RI.
     */
    public void testSerializationCompatibility() throws Exception {

        SerializationTest.verifyGolden(this, new ExportException(errorMessage, cause), comparator);
    }
View Full Code Here

                                                              "serverExporter",
                                                              Exporter.class,
                                                              defaultExporter,
                                                              activationID);
        } catch(ConfigurationException e) {// exception, use default
            throw new ExportException("Configuration exception while "
                                      +"retrieving service's exporter",
                                      e);
        }
        /* Export this service */
        innerProxy = (Fiddler)serverExporter.export(this);
View Full Code Here

               handler);
      success = true;
      return proxy;
     
  } catch (IllegalArgumentException e) {
      throw new ExportException("proxy creation failed", e);
     
  } finally {
      if (!success) {
    unexport(true);
      }
View Full Code Here

      /*
       * Complain if the underlying proxy has a non-public class and
       * implements non-public interfaces.
       */
      if (checkPublic && !Modifier.isPublic(intf.getModifiers())) {
    throw new ExportException(
        "proxy implements non-public interface");
      }
     
      /*
       * Don't add ProxyTrust remote interface to list of proxy
View Full Code Here

      throw new NullPointerException("impl is null");
  }
  try {
      return Util.getRemoteInterfaces(impl.getClass());
  } catch (IllegalArgumentException e) {
      throw new ExportException("cannot get proxy interfaces", e);
  }
    }
View Full Code Here

  try {
      proxy = (Remote) Proxy.newProxyInstance(proxyLoader,
                interfaces,
                handler);
  } catch (IllegalArgumentException e) {
      throw new ExportException("unable to create proxy", e);
  }
  InvocationDispatcher dispatcher =
      createInvocationDispatcher(getInvocationDispatcherMethods(impl),
               impl, caps);
  return new Instances(proxy, dispatcher);
View Full Code Here

TOP

Related Classes of java.rmi.server.ExportException

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.