Codota Logo
RpcException.<init>
Code IndexAdd Codota to your IDE (free)

How to use
com.alibaba.dubbo.rpc.RpcException
constructor

Best Java code snippets using com.alibaba.dubbo.rpc.RpcException.<init> (Showing top 20 results out of 315)

  • Common ways to obtain RpcException
private void myMethod () {
RpcException r =
  • Codota IconString str;new RpcException(str)
  • Codota IconString str;Throwable cause;new RpcException(str, cause)
  • Codota IconThrowable cause;new RpcException(cause)
  • Smart code suggestions by Codota
}
origin: liuyangming/ByteTCC

public <T> Invoker<T> select(List<Invoker<T>> invokers, URL url, Invocation invocation) throws RpcException {
  if (invokers == null || invokers.isEmpty()) {
    throw new RpcException("No invoker is found!");
  }
  int lengthOfInvokerList = invokers == null ? 0 : invokers.size();
  return invokers.get(random.nextInt(lengthOfInvokerList));
}
origin: liuyangming/ByteTCC

public <T> Invoker<T> fireChooseInvoker(List<Invoker<T>> invokers, URL url, Invocation invocation) throws RpcException {
  this.fireInitializeIfNecessary();
  if (this.loadBalancer == null) {
    throw new RpcException("No org.bytesoft.bytetcc.supports.dubbo.ext.ILoadBalancer is found!");
  } else {
    return this.loadBalancer.select(invokers, url, invocation);
  }
}
origin: liuyangming/ByteTCC

throw new RpcException("No invoker is found!");
if (remoteNode == null || StringUtils.isBlank(remoteNode.getServiceKey())) {
  if (rpcException == null) {
    rpcException = new RpcException("Cannot get application name of remote node!");
  } else {
    logger.warn("Cannot get application name of remote node({})!", remoteAddr);
  throw new RpcException("The instance has been enlisted is currently unavailable.");
rpcException = new RpcException("There is already an instance of the same application being enlisted.");
origin: liuyangming/ByteTCC

  invokeError = new RpcException(rex.getMessage());
} catch (RpcException rex) {
  invokeError = rex;
} catch (Throwable rex) {
  logger.error("Error occurred in remote call!", rex);
  invokeError = new RpcException(rex.getMessage());
} finally {
  try {
  } catch (RemotingException rex) {
    if (invokeError == null) {
      throw new RpcException(rex.getMessage());
    } else {
      logger.error("Error occurred in remote call!", rex);
      throw new RpcException(rex.getMessage());
    } else {
      logger.error("Error occurred in remote call!", rex);
  throw (RpcException) serverError;
} else if (RemotingException.class.isInstance(serverError)) {
  throw new RpcException(serverError.getMessage());
} else {
  return result;
origin: liuyangming/ByteTCC

  invokeError = new RpcException(rex.getMessage());
} catch (RpcException rex) {
  invokeError = rex;
} catch (Throwable rex) {
  logger.error("Error occurred in remote call!", rex);
  invokeError = new RpcException(rex.getMessage());
} finally {
  try {
  } catch (RemotingException rex) {
    if (invokeError == null) {
      throw new RpcException(rex.getMessage());
    } else {
      logger.error("Error occurred in remote call!", rex);
      throw new RpcException(rex.getMessage());
    } else {
      logger.error("Error occurred in remote call!", rex);
  throw (RpcException) serverError;
} else if (RemotingException.class.isInstance(serverError)) {
  throw new RpcException(serverError.getMessage());
} else {
  return result;
origin: liuyangming/ByteTCC

throw new RpcException("Cannot get the application name of the remote application.");
origin: liuyangming/ByteTCC

throw new RpcException("Cannot get the application name of the remote application.");
origin: liuyangming/ByteTCC

throw new RpcException("Cannot get the application name of the remote application.");
origin: liuyangming/ByteTCC

throw new RpcException("Cannot get the application name of the remote application.");
origin: liuyangming/ByteTCC

throw new RpcException("Cannot get the application name of the remote application.");
origin: com.alibaba/dubbo

private void error(String generic, String expected, String actual) throws RpcException {
  throw new RpcException(
      "Generic serialization [" +
          generic +
          "] only support message type " +
          expected +
          " and your message type is " +
          actual);
}
origin: com.alibaba/dubbo

@Override
public Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException {
  for (Invoker<T> invoker : invokers) {
    if (invoker.isAvailable()) {
      return invoker.invoke(invocation);
    }
  }
  throw new RpcException("No provider available in " + invokers);
}
origin: linux-china/dubbo3

  public Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException {
    for (Invoker<T> invoker : invokers) {
      if (invoker.isAvailable()) {
        return invoker.invoke(invocation);
      }
    }
    throw new RpcException("No provider available in " + invokers);
  }
};
origin: com.alibaba/dubbo

protected RpcException getRpcException(Class<?> type, URL url, Invocation invocation, Throwable e) {
  RpcException re = new RpcException("Failed to invoke remote service: " + type + ", method: "
      + invocation.getMethodName() + ", cause: " + e.getMessage(), e);
  re.setCode(getErrorCode(e));
  return re;
}
origin: com.alibaba/dubbo

protected void checkWhetherDestroyed() {
  if (destroyed.get()) {
    throw new RpcException("Rpc cluster invoker for " + getInterface() + " on consumer " + NetUtils.getLocalHost()
        + " use dubbo version " + Version.getVersion()
        + " is now destroyed! Can not invoke any more.");
  }
}
origin: com.alibaba/dubbo-rpc-thrift

private ExchangeClient initClient(URL url) {
  ExchangeClient client;
  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;
}
origin: com.alibaba/dubbo

private ExchangeClient initClient(URL url) {
  ExchangeClient client;
  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;
}
origin: com.alibaba/dubbo

@Override
public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
  if (!tpsLimiter.isAllowable(invoker.getUrl(), invocation)) {
    throw new RpcException(
        "Failed to invoke service " +
            invoker.getInterface().getName() +
            "." +
            invocation.getMethodName() +
            " because exceed max service tps.");
  }
  return invoker.invoke(invocation);
}
origin: com.alibaba/dubbo

protected void checkInvokers(List<Invoker<T>> invokers, Invocation invocation) {
  if (invokers == null || invokers.isEmpty()) {
    throw new RpcException("Failed to invoke the method "
        + invocation.getMethodName() + " in the service " + getInterface().getName()
        + ". No provider available for the service " + directory.getUrl().getServiceKey()
        + " from registry " + directory.getUrl().getAddress()
        + " on the consumer " + NetUtils.getLocalHost()
        + " using the dubbo version " + Version.getVersion()
        + ". Please check if the providers have been started and registered.");
  }
}
origin: com.alibaba/dubbo-cluster

protected void checkInvokers(List<Invoker<T>> invokers, Invocation invocation) {
  if (invokers == null || invokers.isEmpty()) {
    throw new RpcException("Failed to invoke the method "
        + invocation.getMethodName() + " in the service " + getInterface().getName()
        + ". No provider available for the service " + directory.getUrl().getServiceKey()
        + " from registry " + directory.getUrl().getAddress()
        + " on the consumer " + NetUtils.getLocalHost()
        + " using the dubbo version " + Version.getVersion()
        + ". Please check if the providers have been started and registered.");
  }
}
com.alibaba.dubbo.rpcRpcException<init>

Popular methods of RpcException

  • getCause
  • getCode
  • getMessage
  • isBiz
  • setCode
  • printStackTrace

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • getApplicationContext (Context)
  • getContentResolver (Context)
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now