程序包 gateway.api
类 RetrofitUtils
java.lang.Object
gateway.api.RetrofitUtils
Retrofit工具类
- 作者:
- neeker
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static retrofit2.RetrofitbuildRetrofit(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm, int jwtTokenLiveSeconds) static retrofit2.RetrofitbuildRetrofit(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm, int jwtTokenLiveSeconds, com.google.gson.Gson gson, String json_date_format, long timeout, TimeUnit time_unit, okhttp3.Interceptor... interceptors) static retrofit2.RetrofitbuildRetrofit(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm, int jwtTokenLiveSeconds, okhttp3.Interceptor... interceptors) static retrofit2.RetrofitbuildRetrofit(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm, okhttp3.Interceptor... interceptors) static retrofit2.Retrofit.BuilderbuildRetrofitBuilder(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm) static retrofit2.Retrofit.BuilderbuildRetrofitBuilder(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm, int jwtTokenLiveSeconds, com.google.gson.Gson gson, String json_date_format, long timeout, TimeUnit time_unit, okhttp3.Interceptor... interceptors) static retrofit2.Retrofit.BuilderbuildRetrofitBuilder(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm, int jwtTokenLiveSeconds, okhttp3.Interceptor... interceptors) static retrofit2.Retrofit.BuilderbuildRetrofitBuilder(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm, okhttp3.Interceptor... interceptors) static retrofit2.RetrofitcreateRetrofit(String apiprefix) 不使用JWT创建Retrofitstatic retrofit2.RetrofitcreateRetrofit(String apiprefix, String jwtAppToken, String jwtPrivateKey, int jwtTokenLiveSeconds) static retrofit2.RetrofitcreateRetrofit(String apiprefix, String jwtAppToken, String jwtPrivateKey, int jwtTokenLiveSeconds, com.google.gson.Gson gson, String json_date_format, long timeout, TimeUnit time_unit, okhttp3.Interceptor... interceptors) 创建Retrofit对象并返回static retrofit2.RetrofitcreateRetrofit(String apiprefix, String jwtAppToken, String jwtPrivateKey, int jwtTokenLiveSeconds, okhttp3.Interceptor... interceptors) 创建Retrofit对象并返回static retrofit2.RetrofitcreateRetrofit(String apiprefix, String jwtAppToken, String jwtPrivateKey, okhttp3.Interceptor... interceptors) 创建Retrofit对象并返回(JWT令牌默认存活1800秒)static retrofit2.Retrofit.BuildercreateRetrofitBuilder(String apiprefix) static retrofit2.Retrofit.BuildercreateRetrofitBuilder(String apiprefix, String jwtAppToken, String jwtPrivateKey) static retrofit2.Retrofit.BuildercreateRetrofitBuilder(String apiprefix, String jwtAppToken, String jwtPrivateKey, int jwtTokenLiveSeconds, com.google.gson.Gson gson, String json_date_format, long timeout, TimeUnit time_unit, okhttp3.Interceptor... interceptors) 创建Retrofit对象并返回static retrofit2.Retrofit.BuildercreateRetrofitBuilder(String apiprefix, String jwtAppToken, String jwtPrivateKey, int jwtTokenLiveSeconds, okhttp3.Interceptor... interceptors) static retrofit2.Retrofit.BuildercreateRetrofitBuilder(String apiprefix, String jwtAppToken, String jwtPrivateKey, okhttp3.Interceptor... interceptors) static retrofit2.Retrofit.BuildercreateRetrofitBuilder(String apiprefix, okhttp3.Interceptor... interceptors) private static String
-
字段详细资料
-
Log
private static final org.apache.commons.logging.Log Log -
GetWebSpringContextMethod
-
GetEnvironmentMethod
-
GetPropertyMethod
-
-
构造器详细资料
-
RetrofitUtils
public RetrofitUtils()
-
-
方法详细资料
-
doGetApiHelperCustomUserAgent
-
createRetrofit
不使用JWT创建Retrofit- 返回:
Retrofit
-
createRetrofitBuilder
public static retrofit2.Retrofit.Builder createRetrofitBuilder(String apiprefix, okhttp3.Interceptor... interceptors) -
createRetrofitBuilder
-
createRetrofit
public static retrofit2.Retrofit createRetrofit(String apiprefix, String jwtAppToken, String jwtPrivateKey, okhttp3.Interceptor... interceptors) 创建Retrofit对象并返回(JWT令牌默认存活1800秒)- 参数:
apiprefix- 第三方接口的URL前缀jwtAppToken- 应用令牌(token)jwtPrivateKey- 应用私钥(RSA)apiprefix-jwtAppToken-jwtPrivateKey-- 返回:
Retrofit
-
buildRetrofit
-
createRetrofitBuilder
-
buildRetrofitBuilder
-
createRetrofitBuilder
-
buildRetrofitBuilder
-
createRetrofit
-
buildRetrofit
-
createRetrofit
public static retrofit2.Retrofit createRetrofit(String apiprefix, String jwtAppToken, String jwtPrivateKey, int jwtTokenLiveSeconds, okhttp3.Interceptor... interceptors) 创建Retrofit对象并返回- 参数:
apiprefix- 第三方接口的URL前缀jwtAppToken- 应用令牌(token)jwtPrivateKey- 应用私钥(RSA)jwtTokenLiveSeconds- 有效时间(秒)- 返回:
Retrofit
-
buildRetrofit
-
createRetrofitBuilder
-
buildRetrofitBuilder
-
createRetrofit
public static retrofit2.Retrofit createRetrofit(String apiprefix, String jwtAppToken, String jwtPrivateKey, int jwtTokenLiveSeconds, com.google.gson.Gson gson, String json_date_format, long timeout, TimeUnit time_unit, okhttp3.Interceptor... interceptors) 创建Retrofit对象并返回- 参数:
apiprefix-jwtAppToken-jwtPrivateKey-jwtTokenLiveSeconds-gson-json_date_format-timeout-time_unit-- 返回:
-
buildRetrofit
-
createRetrofitBuilder
public static retrofit2.Retrofit.Builder createRetrofitBuilder(String apiprefix, String jwtAppToken, String jwtPrivateKey, int jwtTokenLiveSeconds, com.google.gson.Gson gson, String json_date_format, long timeout, TimeUnit time_unit, okhttp3.Interceptor... interceptors) 创建Retrofit对象并返回- 参数:
apiprefix-jwtAppToken-jwtPrivateKey-jwtTokenLiveSeconds-gson-json_date_format-timeout-time_unit-- 返回:
-
buildRetrofitBuilder
-