All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.taobao.hsf.util.RequestCtxUtil Maven / Gradle / Ivy

There is a newer version: 1.8.3
Show newest version
package com.taobao.hsf.util;

/**
 * 暴露给应用的获取请求相关信息的工具
 * 
    *
  • 在进入process方法时设置,退出process方法时清空
  • *
  • RPCProtocolTemplateComponent.invoke0()中设置,返回前清空
  • *
* * */ public class RequestCtxUtil { /** * @return 发起该次请求的客户端ip */ public static String getClientIp() { return null; } /** * @return 发起该次请求的客户端AppName */ public static String getAppNameOfClient() { return null; } /** * 设置这次HSF请求的目标服务器 * * @param ip * @return */ public static void setTargetServerIp(String ip) { } public static String getTargetServerIp() { return null; } public static String getLocalIp() { return ""; } public static void setUserId(long userId) { } public static void setRequestTimeout(int timeout) { } public static void setProviderIp(String ip) { } public static String getProviderIp() { return null; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy