com.weibo.api.motan.rpc.URL.getMethodParameter()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(249)

本文整理了Java中com.weibo.api.motan.rpc.URL.getMethodParameter()方法的一些代码示例,展示了URL.getMethodParameter()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URL.getMethodParameter()方法的具体详情如下:
包路径:com.weibo.api.motan.rpc.URL
类名称:URL
方法名:getMethodParameter

URL.getMethodParameter介绍

暂无

代码示例

代码示例来源:origin: weibocom/motan

public String getMethodParameter(String methodName, String paramDesc, String name, String defaultValue) {
  String value = getMethodParameter(methodName, paramDesc, name);
  if (value == null || value.length() == 0) {
    return defaultValue;
  }
  return value;
}

代码示例来源:origin: weibocom/motan

public Boolean getMethodParameter(String methodName, String paramDesc, String name, boolean defaultValue) {
  String value = getMethodParameter(methodName, paramDesc, name);
  if (value == null || value.length() == 0) {
    return defaultValue;
  }
  return Boolean.parseBoolean(value);
}

代码示例来源:origin: weibocom/motan

public Long getMethodParameter(String methodName, String paramDesc, String name, long defaultValue) {
  String key = methodName + "(" + paramDesc + ")." + name;
  Number n = getNumbers().get(key);
  if (n != null) {
    return n.longValue();
  }
  String value = getMethodParameter(methodName, paramDesc, name);
  if (value == null || value.length() == 0) {
    return defaultValue;
  }
  long l = Long.parseLong(value);
  getNumbers().put(key, l);
  return l;
}

代码示例来源:origin: weibocom/motan

public Integer getMethodParameter(String methodName, String paramDesc, String name, int defaultValue) {
  String key = methodName + "(" + paramDesc + ")." + name;
  Number n = getNumbers().get(key);
  if (n != null) {
    return n.intValue();
  }
  String value = getMethodParameter(methodName, paramDesc, name);
  if (value == null || value.length() == 0) {
    return defaultValue;
  }
  int i = Integer.parseInt(value);
  getNumbers().put(key, i);
  return i;
}

代码示例来源:origin: weibocom/motan

public Float getMethodParameter(String methodName, String paramDesc, String name, float defaultValue) {
  String key = methodName + "(" + paramDesc + ")." + name;
  Number n = getNumbers().get(key);
  if (n != null) {
    return n.floatValue();
  }
  String value = getMethodParameter(methodName, paramDesc, name);
  if (value == null || value.length() == 0) {
    return defaultValue;
  }
  float f = Float.parseFloat(value);
  getNumbers().put(key, f);
  return f;
}

代码示例来源:origin: weibocom/motan

refUrl.getMethodParameter(request.getMethodName(), request.getParamtersDesc(), URLParamType.retries.getName(),
    URLParamType.retries.getIntValue());

代码示例来源:origin: weibocom/motan

@Override
public Response request(Request request) throws TransportException {
  int timeout = nettyClient.getUrl().getMethodParameter(request.getMethodName(), request.getParamtersDesc(), URLParamType.requestTimeout.getName(), URLParamType.requestTimeout.getIntValue());
  if (timeout <= 0) {
    throw new MotanFrameworkException("NettyClient init Error: timeout(" + timeout + ") <= 0 is forbid.", MotanErrorMsgConstant.FRAMEWORK_INIT_ERROR);

代码示例来源:origin: weibocom/motan

@Override
public Response request(Request request) throws TransportException {
  int timeout = nettyClient.getUrl().getMethodParameter(request.getMethodName(), request.getParamtersDesc(),
      URLParamType.requestTimeout.getName(), URLParamType.requestTimeout.getIntValue());
  if (timeout <= 0) {

代码示例来源:origin: weibocom/motan

url.getMethodParameter(request.getMethodName(), request.getParamtersDesc(), URLParamType.requestTimeout.getName(),
        URLParamType.requestTimeout.getIntValue());
if (timeout < 0) {

代码示例来源:origin: com.weibo/motan-transport-netty4

@Override
public Response request(Request request) throws TransportException {
  int timeout = nettyClient.getUrl().getMethodParameter(request.getMethodName(), request.getParamtersDesc(), URLParamType.requestTimeout.getName(), URLParamType.requestTimeout.getIntValue());
  if (timeout <= 0) {
    throw new MotanFrameworkException("NettyClient init Error: timeout(" + timeout + ") <= 0 is forbid.", MotanErrorMsgConstant.FRAMEWORK_INIT_ERROR);

相关文章