Package java.rmi.server

Examples of java.rmi.server.ExportException


                Thread t = AccessController.doPrivileged(
                    new NewThreadAction(new AcceptLoop(server),
                                        "TCP Accept-" + port, true));
                t.start();
            } catch (java.net.BindException e) {
                throw new ExportException("Port already in use: " + port, e);
            } catch (IOException e) {
                throw new ExportException("Listen failed on port: " + port, e);
            }

        } else {
            // otherwise verify security access to existing server socket
            SecurityManager sm = System.getSecurityManager();
View Full Code Here


                                      boolean startListen,
                                      boolean isSystem)
            throws RemoteException {
        if (isExported(obj)) {
            // rmi.7B=Object {0} has already been exported.
            throw new ExportException(Messages.getString("rmi.7B", obj)); //$NON-NLS-1$
        }
        Remote stub = sref.exportObject(obj, null, useProxyStubs, startListen,
                isSystem);
        RMIReference rref = new RMIReference(obj, dgcQueue);
        RMIObjectInfo info = new RMIObjectInfo(
View Full Code Here

                // start listening thread
                mgr = ServerConnectionManager.getMgr(ep);
            }
        } catch (BindException be) {
            // rmi.63=Unable to export object: port {0} already in use
            throw new ExportException(Messages.getString("rmi.63", //$NON-NLS-1$
                    ep.getPort()), be);
        } catch (Exception ex) {
            // rmi.64=Unable to export object on port {0}
            throw new ExportException(Messages.getString("rmi.64", //$NON-NLS-1$
                    ep.getPort()), ex);
        }
        return stub;
    }
View Full Code Here

                                      boolean startListen,
                                      boolean isSystem)
            throws RemoteException {
        if (isExported(obj)) {
            // rmi.7B=Object {0} has already been exported.
            throw new ExportException(Messages.getString("rmi.7B", obj)); //$NON-NLS-1$
        }
        Remote stub = sref.exportObject(obj, null, useProxyStubs, startListen,
                isSystem);
        RMIReference rref = new RMIReference(obj, dgcQueue);
        RMIObjectInfo info = new RMIObjectInfo(
View Full Code Here

                // start listening thread
                mgr = ServerConnectionManager.getMgr(ep);
            }
        } catch (BindException be) {
            // rmi.63=Unable to export object: port {0} already in use
            throw new ExportException(Messages.getString("rmi.63", //$NON-NLS-1$
                    ep.getPort()), be);
        } catch (Exception ex) {
            // rmi.64=Unable to export object on port {0}
            throw new ExportException(Messages.getString("rmi.64", //$NON-NLS-1$
                    ep.getPort()), ex);
        }
        return stub;
    }
View Full Code Here

        Remote stub;

        try {
            stub = Util.createProxy(implClass, getClientRef(), forceStubUse);
        } catch (IllegalArgumentException e) {
            throw new ExportException(
                "remote object implements illegal remote interface", e);
        }
        if (stub instanceof RemoteStub) {
            setSkeleton(impl);
        }
View Full Code Here

        checkConstraints(serverCapabilities,
             (InvocationConstraints) iter.next());
    }
      }
  } catch (UnsupportedConstraintException e) {
      throw new ExportException(
    "server does not support some constraints", e);
  }
    }
View Full Code Here

     */
    @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

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.