Package com.flaptor.util.remote

Examples of com.flaptor.util.remote.RpcException


    public GroupedSearchResults search(AQuery query, int firstResult, int count,  AGroup groupBy, int groupSize, AFilter filter, ASort sort) throws RpcException {
        int requests = requestsInProgress.incrementAndGet();
        try {
            if ( requests > maxSimultaneousRequests) {
                throw new RpcException("There are too many requests in progress( current: " + requests + ", max: " + maxSimultaneousRequests
                        + "). Server call skipped.");
            }
            try {
                if (super.checkConnection()) {
                    GroupedSearchResults res = remoteSearcher.search(query, firstResult, count, groupBy, groupSize,filter, sort);
                    super.connectionSuccess();
                    return res;
                } else {
                    throw new RpcException("The recconection policy requested not to contact the server. Server call skipped.");
                }
            } catch (RemoteException e) {
                logger.error("search: exception caught.", e);
                super.connectionFailure();
                throw new RpcException(e);
            }
        } finally {
            requestsInProgress.decrementAndGet();
        }
    }
View Full Code Here


            if (super.checkConnection()) {
                IndexerReturnCode res = remoteIndexer.index(doc);
                super.connectionSuccess();
                return res;
            } else {
                throw new RpcException("Couldn't connect to remote indexer to send a document");
            }
        } catch (RemoteException e) {
            logger.error(e,e);
            super.connectionFailure();
            throw new RpcException(e);
        }
    }
View Full Code Here

            if (super.checkConnection()) {
                IndexerReturnCode res = remoteIndexer.index(text);
                super.connectionSuccess();
                return res;
            } else {
                throw new RpcException("Couldn't connect to remote indexer to send a document");
            }
        } catch (RemoteException e) {
            logger.error(e,e);
            super.connectionFailure();
            throw new RpcException(e);
        }
    }
View Full Code Here

        try {
            if (super.checkConnection()) {
                remotePageCatcher.addPage(page);
                super.connectionSuccess();
            } else {
                throw new RpcException("AddPage failed trying to connect to remote PageCatcher");
            }
        } catch (RemoteException e) {
            logger.error(e,e);
            super.connectionFailure();
            throw new RpcException(e);
        } catch (RpcException e) {
            logger.error(e,e);
            super.connectionFailure();
            throw e;
        }
View Full Code Here

TOP

Related Classes of com.flaptor.util.remote.RpcException

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.