Tabnine Logo
TimeoutException.getMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
getMessage
method
in
org.apache.dubbo.remoting.TimeoutException

Best Java code snippets using org.apache.dubbo.remoting.TimeoutException.getMessage (Showing top 12 results out of 315)

origin: apache/incubator-dubbo

@Override
protected Result doInvoke(Invocation invocation) throws Throwable {
  RpcInvocation inv = (RpcInvocation) invocation;
  // use interface's name as service path to export if it's not found on client side
  inv.setAttachment(Constants.PATH_KEY, getInterface().getName());
  inv.setAttachment(Constants.CALLBACK_SERVICE_KEY, serviceKey);
  try {
    if (getUrl().getMethodParameter(invocation.getMethodName(), Constants.ASYNC_KEY, false)) { // may have concurrency issue
      currentClient.send(inv, getUrl().getMethodParameter(invocation.getMethodName(), Constants.SENT_KEY, false));
      return new RpcResult();
    }
    int timeout = getUrl().getMethodParameter(invocation.getMethodName(), Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT);
    if (timeout > 0) {
      return (Result) currentClient.request(inv, timeout).get();
    } else {
      return (Result) currentClient.request(inv).get();
    }
  } catch (RpcException e) {
    throw e;
  } catch (TimeoutException e) {
    throw new RpcException(RpcException.TIMEOUT_EXCEPTION, e.getMessage(), e);
  } catch (RemotingException e) {
    throw new RpcException(RpcException.NETWORK_EXCEPTION, e.getMessage(), e);
  } catch (Throwable e) { // here is non-biz exception, wrap it.
    throw new RpcException(e.getMessage(), e);
  }
}
origin: apache/incubator-dubbo

@Override
protected Result doInvoke(Invocation invocation) throws Throwable {
  RpcInvocation inv = (RpcInvocation) invocation;
  // use interface's name as service path to export if it's not found on client side
  inv.setAttachment(Constants.PATH_KEY, getInterface().getName());
  inv.setAttachment(Constants.CALLBACK_SERVICE_KEY, serviceKey);
  try {
    if (getUrl().getMethodParameter(invocation.getMethodName(), Constants.ASYNC_KEY, false)) { // may have concurrency issue
      currentClient.send(inv, getUrl().getMethodParameter(invocation.getMethodName(), Constants.SENT_KEY, false));
      return new RpcResult();
    }
    int timeout = getUrl().getMethodParameter(invocation.getMethodName(), Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT);
    if (timeout > 0) {
      return (Result) currentClient.request(inv, timeout).get();
    } else {
      return (Result) currentClient.request(inv).get();
    }
  } catch (RpcException e) {
    throw e;
  } catch (TimeoutException e) {
    throw new RpcException(RpcException.TIMEOUT_EXCEPTION, e.getMessage(), e);
  } catch (RemotingException e) {
    throw new RpcException(RpcException.NETWORK_EXCEPTION, e.getMessage(), e);
  } catch (Throwable e) { // here is non-biz exception, wrap it.
    throw new RpcException(e.getMessage(), e);
  }
}
origin: apache/incubator-dubbo

@Override
protected Result doInvoke(Invocation invocation) throws Throwable {
  RpcInvocation inv = (RpcInvocation) invocation;
  final String methodName;
  methodName = invocation.getMethodName();
  inv.setAttachment(Constants.PATH_KEY, getUrl().getPath());
  // for thrift codec
  inv.setAttachment(ThriftCodec.PARAMETER_CLASS_NAME_GENERATOR, getUrl().getParameter(
      ThriftCodec.PARAMETER_CLASS_NAME_GENERATOR, DubboClassNameGenerator.NAME));
  ExchangeClient currentClient;
  if (clients.length == 1) {
    currentClient = clients[0];
  } else {
    currentClient = clients[index.getAndIncrement() % clients.length];
  }
  try {
    int timeout = getUrl().getMethodParameter(
        methodName, Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT);
    RpcContext.getContext().setFuture(null);
    return (Result) currentClient.request(inv, timeout).get();
  } catch (TimeoutException e) {
    throw new RpcException(RpcException.TIMEOUT_EXCEPTION, e.getMessage(), e);
  } catch (RemotingException e) {
    throw new RpcException(RpcException.NETWORK_EXCEPTION, e.getMessage(), e);
  }
}
origin: apache/incubator-dubbo

@Override
protected Result doInvoke(Invocation invocation) throws Throwable {
  RpcInvocation inv = (RpcInvocation) invocation;
  final String methodName;
  methodName = invocation.getMethodName();
  inv.setAttachment(Constants.PATH_KEY, getUrl().getPath());
  // for thrift codec
  inv.setAttachment(ThriftCodec.PARAMETER_CLASS_NAME_GENERATOR, getUrl().getParameter(
      ThriftCodec.PARAMETER_CLASS_NAME_GENERATOR, DubboClassNameGenerator.NAME));
  ExchangeClient currentClient;
  if (clients.length == 1) {
    currentClient = clients[0];
  } else {
    currentClient = clients[index.getAndIncrement() % clients.length];
  }
  try {
    int timeout = getUrl().getMethodParameter(
        methodName, Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT);
    RpcContext.getContext().setFuture(null);
    return (Result) currentClient.request(inv, timeout).get();
  } catch (TimeoutException e) {
    throw new RpcException(RpcException.TIMEOUT_EXCEPTION, e.getMessage(), e);
  } catch (RemotingException e) {
    throw new RpcException(RpcException.NETWORK_EXCEPTION, e.getMessage(), e);
  }
}
origin: apache/incubator-dubbo

  throw new RpcException(RpcException.TIMEOUT_EXCEPTION, "Invoke remote method timeout. method: " + invocation.getMethodName() + ", provider: " + getUrl() + ", cause: " + e.getMessage(), e);
} catch (RemotingException e) {
  throw new RpcException(RpcException.NETWORK_EXCEPTION, "Failed to invoke remote method: " + invocation.getMethodName() + ", provider: " + getUrl() + ", cause: " + e.getMessage(), e);
origin: apache/incubator-dubbo

  throw new RpcException(RpcException.TIMEOUT_EXCEPTION, "Invoke remote method timeout. method: " + invocation.getMethodName() + ", provider: " + getUrl() + ", cause: " + e.getMessage(), e);
} catch (RemotingException e) {
  throw new RpcException(RpcException.NETWORK_EXCEPTION, "Failed to invoke remote method: " + invocation.getMethodName() + ", provider: " + getUrl() + ", cause: " + e.getMessage(), e);
origin: org.apache.dubbo/dubbo

@Override
protected Result doInvoke(Invocation invocation) throws Throwable {
  RpcInvocation inv = (RpcInvocation) invocation;
  // use interface's name as service path to export if it's not found on client side
  inv.setAttachment(Constants.PATH_KEY, getInterface().getName());
  inv.setAttachment(Constants.CALLBACK_SERVICE_KEY, serviceKey);
  try {
    if (getUrl().getMethodParameter(invocation.getMethodName(), Constants.ASYNC_KEY, false)) { // may have concurrency issue
      currentClient.send(inv, getUrl().getMethodParameter(invocation.getMethodName(), Constants.SENT_KEY, false));
      return new RpcResult();
    }
    int timeout = getUrl().getMethodParameter(invocation.getMethodName(), Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT);
    if (timeout > 0) {
      return (Result) currentClient.request(inv, timeout).get();
    } else {
      return (Result) currentClient.request(inv).get();
    }
  } catch (RpcException e) {
    throw e;
  } catch (TimeoutException e) {
    throw new RpcException(RpcException.TIMEOUT_EXCEPTION, e.getMessage(), e);
  } catch (RemotingException e) {
    throw new RpcException(RpcException.NETWORK_EXCEPTION, e.getMessage(), e);
  } catch (Throwable e) { // here is non-biz exception, wrap it.
    throw new RpcException(e.getMessage(), e);
  }
}
origin: org.apache.dubbo/dubbo-rpc-dubbo

@Override
protected Result doInvoke(Invocation invocation) throws Throwable {
  RpcInvocation inv = (RpcInvocation) invocation;
  // use interface's name as service path to export if it's not found on client side
  inv.setAttachment(Constants.PATH_KEY, getInterface().getName());
  inv.setAttachment(Constants.CALLBACK_SERVICE_KEY, serviceKey);
  try {
    if (getUrl().getMethodParameter(invocation.getMethodName(), Constants.ASYNC_KEY, false)) { // may have concurrency issue
      currentClient.send(inv, getUrl().getMethodParameter(invocation.getMethodName(), Constants.SENT_KEY, false));
      return new RpcResult();
    }
    int timeout = getUrl().getMethodParameter(invocation.getMethodName(), Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT);
    if (timeout > 0) {
      return (Result) currentClient.request(inv, timeout).get();
    } else {
      return (Result) currentClient.request(inv).get();
    }
  } catch (RpcException e) {
    throw e;
  } catch (TimeoutException e) {
    throw new RpcException(RpcException.TIMEOUT_EXCEPTION, e.getMessage(), e);
  } catch (RemotingException e) {
    throw new RpcException(RpcException.NETWORK_EXCEPTION, e.getMessage(), e);
  } catch (Throwable e) { // here is non-biz exception, wrap it.
    throw new RpcException(e.getMessage(), e);
  }
}
origin: org.apache.dubbo/dubbo-rpc-thrift

@Override
protected Result doInvoke(Invocation invocation) throws Throwable {
  RpcInvocation inv = (RpcInvocation) invocation;
  final String methodName;
  methodName = invocation.getMethodName();
  inv.setAttachment(Constants.PATH_KEY, getUrl().getPath());
  // for thrift codec
  inv.setAttachment(ThriftCodec.PARAMETER_CLASS_NAME_GENERATOR, getUrl().getParameter(
      ThriftCodec.PARAMETER_CLASS_NAME_GENERATOR, DubboClassNameGenerator.NAME));
  ExchangeClient currentClient;
  if (clients.length == 1) {
    currentClient = clients[0];
  } else {
    currentClient = clients[index.getAndIncrement() % clients.length];
  }
  try {
    int timeout = getUrl().getMethodParameter(
        methodName, Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT);
    RpcContext.getContext().setFuture(null);
    return (Result) currentClient.request(inv, timeout).get();
  } catch (TimeoutException e) {
    throw new RpcException(RpcException.TIMEOUT_EXCEPTION, e.getMessage(), e);
  } catch (RemotingException e) {
    throw new RpcException(RpcException.NETWORK_EXCEPTION, e.getMessage(), e);
  }
}
origin: org.apache.dubbo/dubbo

@Override
protected Result doInvoke(Invocation invocation) throws Throwable {
  RpcInvocation inv = (RpcInvocation) invocation;
  final String methodName;
  methodName = invocation.getMethodName();
  inv.setAttachment(Constants.PATH_KEY, getUrl().getPath());
  // for thrift codec
  inv.setAttachment(ThriftCodec.PARAMETER_CLASS_NAME_GENERATOR, getUrl().getParameter(
      ThriftCodec.PARAMETER_CLASS_NAME_GENERATOR, DubboClassNameGenerator.NAME));
  ExchangeClient currentClient;
  if (clients.length == 1) {
    currentClient = clients[0];
  } else {
    currentClient = clients[index.getAndIncrement() % clients.length];
  }
  try {
    int timeout = getUrl().getMethodParameter(
        methodName, Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT);
    RpcContext.getContext().setFuture(null);
    return (Result) currentClient.request(inv, timeout).get();
  } catch (TimeoutException e) {
    throw new RpcException(RpcException.TIMEOUT_EXCEPTION, e.getMessage(), e);
  } catch (RemotingException e) {
    throw new RpcException(RpcException.NETWORK_EXCEPTION, e.getMessage(), e);
  }
}
origin: org.apache.dubbo/dubbo-rpc-dubbo

  throw new RpcException(RpcException.TIMEOUT_EXCEPTION, "Invoke remote method timeout. method: " + invocation.getMethodName() + ", provider: " + getUrl() + ", cause: " + e.getMessage(), e);
} catch (RemotingException e) {
  throw new RpcException(RpcException.NETWORK_EXCEPTION, "Failed to invoke remote method: " + invocation.getMethodName() + ", provider: " + getUrl() + ", cause: " + e.getMessage(), e);
origin: org.apache.dubbo/dubbo

  throw new RpcException(RpcException.TIMEOUT_EXCEPTION, "Invoke remote method timeout. method: " + invocation.getMethodName() + ", provider: " + getUrl() + ", cause: " + e.getMessage(), e);
} catch (RemotingException e) {
  throw new RpcException(RpcException.NETWORK_EXCEPTION, "Failed to invoke remote method: " + invocation.getMethodName() + ", provider: " + getUrl() + ", cause: " + e.getMessage(), e);
org.apache.dubbo.remotingTimeoutExceptiongetMessage

Popular methods of TimeoutException

  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • requestLocationUpdates (LocationManager)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Reference (javax.naming)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now