Examples of RPCException


Examples of com.alibaba.dubbo.rpc.RpcException

        url = url.addParameter( Constants.CODEC_KEY, ThriftCodec.NAME );

        try {
            client = Exchangers.connect( url );
        } catch ( RemotingException e ) {
            throw new RpcException( "Fail to create remoting client for service(" + url
                                            + "): " + e.getMessage(), e );
        }

        return client;
View Full Code Here

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

Examples of com.flaptor.util.remote.RpcException

            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

Examples of com.flaptor.util.remote.RpcException

            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

Examples of com.flaptor.util.remote.RpcException

        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

Examples of nexj.core.rpc.RPCException

         {
            instance.setValue("data", Binary.fromObject(request));
         }
         catch (IOException e)
         {
            throw new RPCException("err.rpc.requestSerialization", e);
         }
      }
      else
      {
         instance.setValue("object", accessor);
View Full Code Here

Examples of org.apache.curator.x.rpc.idl.exceptions.RpcException

    public static CuratorEntry mustGetEntry(ConnectionManager connectionManager, CuratorProjection projection) throws RpcException
    {
        CuratorEntry entry = connectionManager.get(projection.id);
        if ( entry == null )
        {
            throw new RpcException(ExceptionType.GENERAL, null, null, "No CuratorProjection found with the id: " + projection.id);
        }
        return entry;
    }
View Full Code Here

Examples of org.apache.drill.exec.rpc.RpcException

        failAll();
      }
    }
     
    if(failed){
      l.submissionFailed(new RpcException("Remote failure while running query." + batch.getHeader().getErrorList()));
      resultsListener.remove(result.getQueryId(), l);
    }else{
      l.resultArrived(batch);
    }
   
View Full Code Here

Examples of org.apache.drill.exec.rpc.RpcException

  }

  private void failAll() {
    for (UserResultsListener l : resultsListener.values()) {
      l.submissionFailed(new RpcException("Received result without QueryId"));
    }
  }
View Full Code Here

Examples of org.apache.drill.exec.rpc.RpcException

      // logger.debug("Received query to run.  Returning query handle.");
      try {
        RunQuery query = RunQuery.PARSER.parseFrom(new ByteBufInputStream(pBody));
        return new Response(RpcType.QUERY_HANDLE, worker.submitWork(connection, query));
      } catch (InvalidProtocolBufferException e) {
        throw new RpcException("Failure while decoding RunQuery body.", e);
      }

    case RpcType.REQUEST_RESULTS_VALUE:
      // logger.debug("Received results requests.  Returning empty query result.");
      try {
        RequestResults req = RequestResults.PARSER.parseFrom(new ByteBufInputStream(pBody));
        return new Response(RpcType.QUERY_RESULT, worker.getResult(connection, req));
      } catch (InvalidProtocolBufferException e) {
        throw new RpcException("Failure while decoding RequestResults body.", e);
      }

    default:
      throw new UnsupportedOperationException();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.