Package java.rmi.server

Examples of java.rmi.server.ExportException


     */
    private Proxy addProxy(ObjectRef ref, URI uri, Object object,
                           Class proxyClass) throws ExportException {

        if (object != ref.getObject()) {
            throw new ExportException("Cannot export object on URI=" + uri
                                      + ": object mismatch");
        }
        if (proxyClass != ref.getProxyClass()) {
            throw new ExportException("Cannot export object on URI=" + uri
                                      + ": proxy class mismatch");
        }

        accept(uri);
        return ref.addProxy(getRoute(uri));
View Full Code Here


     */
    private Proxy addProxyTo(ObjectRef ref, URI uri, Object object,
                             Class proxyClass) throws ExportException {

        if (object != ref.getObject()) {
            throw new ExportException("Cannot export object on URI=" + uri
                                      + ": object mismatch");
        }
        if (proxyClass != ref.getProxyClass()) {
            throw new ExportException("Cannot export object on URI=" + uri
                                      + ": proxy class mismatch");
        }

        return ref.addProxy(uri);
    }
View Full Code Here

        if (connection == null) {
            throw new IllegalArgumentException("Argument 'connection' is null");
        }
        Caller caller = orb.getCaller();
        if (caller == null) {
            throw new ExportException("Can't determine remote caller");
        }
        _uri = caller.getRemoteURI().toString();
        orb.addCallerListener(_uri, this);
        _connection = connection;
    }
View Full Code Here

     */
    public Proxy exportObjectTo(Object object) throws ExportException,
            StubNotFoundException {
        Caller caller = (Caller) _caller.get();
        if (caller == null) {
            throw new ExportException("Cannot export - no current caller");
        }
        return doExportTo(object, caller.getLocalURI());
    }
View Full Code Here

            // and then disposes its server proxies - the connection
            // will be prematurely closed. The connection needs to be kept
            // until the object is unexported.
            connection.close();
        } catch (ResourceException exception) {
            throw new ExportException("Failed to connect to URI: " + uri,
                    exception);
        }
        return result;
    }
View Full Code Here

     */
    protected void accept(URI uri) throws ExportException {
        try {
            _manager.accept(uri, getProperties());
        } catch (ResourceException exception) {
            throw new ExportException("Failed to accept connections on URI: "
                    + uri, exception);
        }
    }
View Full Code Here

        if (Util.getTie(obj) != null) {

            // Yes, so this is an error...

            throw new ExportException (obj.getClass().getName() + " already exported");
        }

        // Can we load a Tie?

        Tie theTie = Utility.loadTie(obj);
View Full Code Here

                  (Exporter)thisConfig.getEntry(COMPONENT_NAME,
                                                "eventListenerExporter",
                                                Exporter.class,
                                                defaultExporter );
            } catch(ConfigurationException e) {// exception, use default
                ExportException e1 = new ExportException
                                            ("Configuration exception while "
                                             +"retrieving exporter for "
                                             +"cache's remote event listener",
                                             e);
                throw e1;
View Full Code Here

            DGCImpl.dgcLog.log(Log.VERBOSE, "add object " + oe);
        }

        Remote impl = target.getImpl();
        if (impl == null) {
            throw new ExportException(
                "internal error: attempt to export collected object");
        }

        synchronized (tableLock) {
            if (objTable.containsKey(oe)) {
                throw new ExportException(
                    "internal error: ObjID already in use");
            } else if (implTable.containsKey(weakImpl)) {
                throw new ExportException("object already exported");
            }

            objTable.put(oe, target);
            implTable.put(weakImpl, target);
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

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.