Package net.jini.jrmp

Examples of net.jini.jrmp.JrmpExporter


    /**
     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        JrmpExporter je = createJrmpExporter();
        ActivationID resId = je.getActivationID();

        if (cId == null) {
            if (resId != null) {
                // FAIL
                throw new TestException(
View Full Code Here


    /**
     * This method performs all actions mentioned in class description.
     *
     */
    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

    /**
     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        JrmpExporter je = createJrmpExporter();
        RMIServerSocketFactory resSsf = je.getServerSocketFactory();

        if (cType == SOCKS_FACTORY || cType == ID_SOCKS_FACTORY) {
            if (!resSsf.equals(cSsf)) {
                // FAIL
                throw new TestException(
                        "getServerSocketFactory method of JrmpExporter "
                        + "with " + cSsf + " returns " + resSsf
                        + " as a result while " + cSsf + " is expected.");
            } else {
                // PASS
                logger.log(Level.FINE,
                        "getServerSocketFactory method of JrmpExporter"
                        + " with " + cSsf + " returns " + cSsf
                        + " as a result as expected.");
            }
            cSsf = null;
            je = createJrmpExporter();
            resSsf = je.getServerSocketFactory();

            if (resSsf != null) {
                // FAIL
                throw new TestException(
                        "getServerSocketFactory method of JrmpExporter "
View Full Code Here

    /**
     * Creates an exporter with an underlying {@link JrmpExporter} that
     * exports on an anonymous port.
     */
    public InstantiatorAccessExporter() {
  this.exporter = new JrmpExporter();
    }
View Full Code Here

    /**
     * Creates an exporter with an underlying {@link JrmpExporter} that
     * exports on the standard activation port (1098).
     */
    public MonitorAccessExporter() {
  this.exporter = new JrmpExporter(ActivationSystem.SYSTEM_PORT);
    }
View Full Code Here

     *
     * @param port the port on which to receive calls (if zero, an anonymous
     * port will be chosen)
     */
    public MonitorAccessExporter(int port) {
  this.exporter = new JrmpExporter(port);
    }
View Full Code Here

      impl.getClientHost();
      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");
  }
  exporter.unexport(true);
    }
View Full Code Here

  /**
   * Construct a <code>NonActivatableGroup</code>. Instances export themselves
   * at construction time using a <code>JrmpExporter</code>.
   */
  public GroupImpl() {
      exporter = new JrmpExporter();
      try {
    proxy = exporter.export(this);
      } catch (ExportException e) {
    e.printStackTrace();
    try {Thread.sleep(5000);} catch (Exception e2){}
View Full Code Here

        uexporter = new
      BasicJeriExporter(TcpServerEndpoint.getInstance(0),
            new BasicILFactory(),
            true, true);
    } else if (exportType.equals("jrmp")) {
        uexporter = new JrmpExporter();
    } else {
        throw new ExportException("unknown exportType");
    }
    exporter = new ActivationExporter(id, uexporter);
    stub = exporter.export(impl);
View Full Code Here

        // unexport object
        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 "
                    + "remote call in progress does not satisfy "
                    + "specification.");
        } else {
            // PASS
            logger.log(Level.FINE,
                    "Result of GetServerContext invocation when there "
                    + "is a remote call in progress satisfies "
                    + "specification.");
        }

        // unexport object
        je.unexport(true);
    }
View Full Code Here

TOP

Related Classes of net.jini.jrmp.JrmpExporter

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.