public abstract class RetrofitUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private static Method |
GetEnvironmentMethod |
private static Method |
GetPropertyMethod |
private static Method |
GetWebSpringContextMethod |
private static org.apache.commons.logging.Log |
Log |
| 构造器和说明 |
|---|
RetrofitUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static retrofit2.Retrofit |
buildRetrofit(String apiprefix,
String jwtAppToken,
com.auth0.jwt.algorithms.Algorithm algorithm,
int jwtTokenLiveSeconds) |
static retrofit2.Retrofit |
buildRetrofit(String apiprefix,
String jwtAppToken,
com.auth0.jwt.algorithms.Algorithm algorithm,
okhttp3.Interceptor... interceptors) |
static retrofit2.Retrofit |
buildRetrofit(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 |
buildRetrofit(String apiprefix,
String jwtAppToken,
com.auth0.jwt.algorithms.Algorithm algorithm,
int jwtTokenLiveSeconds,
okhttp3.Interceptor... interceptors) |
static retrofit2.Retrofit.Builder |
buildRetrofitBuilder(String apiprefix,
String jwtAppToken,
com.auth0.jwt.algorithms.Algorithm algorithm) |
static retrofit2.Retrofit.Builder |
buildRetrofitBuilder(String apiprefix,
String jwtAppToken,
com.auth0.jwt.algorithms.Algorithm algorithm,
okhttp3.Interceptor... interceptors) |
static retrofit2.Retrofit.Builder |
buildRetrofitBuilder(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.Builder |
buildRetrofitBuilder(String apiprefix,
String jwtAppToken,
com.auth0.jwt.algorithms.Algorithm algorithm,
int jwtTokenLiveSeconds,
okhttp3.Interceptor... interceptors) |
static retrofit2.Retrofit |
createRetrofit(String apiprefix)
不使用JWT创建Retrofit
|
static retrofit2.Retrofit |
createRetrofit(String apiprefix,
String jwtAppToken,
String jwtPrivateKey,
int jwtTokenLiveSeconds) |
static retrofit2.Retrofit |
createRetrofit(String apiprefix,
String jwtAppToken,
String jwtPrivateKey,
okhttp3.Interceptor... interceptors)
创建Retrofit对象并返回(JWT令牌默认存活1800秒)
|
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对象并返回
|
static retrofit2.Retrofit |
createRetrofit(String apiprefix,
String jwtAppToken,
String jwtPrivateKey,
int jwtTokenLiveSeconds,
okhttp3.Interceptor... interceptors)
创建Retrofit对象并返回
|
static retrofit2.Retrofit.Builder |
createRetrofitBuilder(String apiprefix) |
static retrofit2.Retrofit.Builder |
createRetrofitBuilder(String apiprefix,
okhttp3.Interceptor... interceptors) |
static retrofit2.Retrofit.Builder |
createRetrofitBuilder(String apiprefix,
String jwtAppToken,
String jwtPrivateKey) |
static retrofit2.Retrofit.Builder |
createRetrofitBuilder(String apiprefix,
String jwtAppToken,
String jwtPrivateKey,
okhttp3.Interceptor... interceptors) |
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对象并返回
|
static retrofit2.Retrofit.Builder |
createRetrofitBuilder(String apiprefix,
String jwtAppToken,
String jwtPrivateKey,
int jwtTokenLiveSeconds,
okhttp3.Interceptor... interceptors) |
private static String |
doGetApiHelperCustomUserAgent() |
private static final org.apache.commons.logging.Log Log
private static Method GetWebSpringContextMethod
private static Method GetEnvironmentMethod
private static Method GetPropertyMethod
private static String doGetApiHelperCustomUserAgent()
public static retrofit2.Retrofit createRetrofit(String apiprefix)
Retrofitpublic static retrofit2.Retrofit.Builder createRetrofitBuilder(String apiprefix, okhttp3.Interceptor... interceptors)
public static retrofit2.Retrofit.Builder createRetrofitBuilder(String apiprefix)
public static retrofit2.Retrofit createRetrofit(String apiprefix, String jwtAppToken, String jwtPrivateKey, okhttp3.Interceptor... interceptors)
apiprefix - 第三方接口的URL前缀jwtAppToken - 应用令牌(token)jwtPrivateKey - 应用私钥(RSA)apiprefix - jwtAppToken - jwtPrivateKey - Retrofitpublic static retrofit2.Retrofit buildRetrofit(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm, okhttp3.Interceptor... interceptors)
public static retrofit2.Retrofit.Builder createRetrofitBuilder(String apiprefix, String jwtAppToken, String jwtPrivateKey)
public static retrofit2.Retrofit.Builder buildRetrofitBuilder(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm)
public static retrofit2.Retrofit.Builder createRetrofitBuilder(String apiprefix, String jwtAppToken, String jwtPrivateKey, okhttp3.Interceptor... interceptors)
public static retrofit2.Retrofit.Builder buildRetrofitBuilder(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm, okhttp3.Interceptor... interceptors)
public static retrofit2.Retrofit createRetrofit(String apiprefix, String jwtAppToken, String jwtPrivateKey, int jwtTokenLiveSeconds)
public static retrofit2.Retrofit buildRetrofit(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm, int jwtTokenLiveSeconds)
public static retrofit2.Retrofit createRetrofit(String apiprefix, String jwtAppToken, String jwtPrivateKey, int jwtTokenLiveSeconds, okhttp3.Interceptor... interceptors)
apiprefix - 第三方接口的URL前缀jwtAppToken - 应用令牌(token)jwtPrivateKey - 应用私钥(RSA)jwtTokenLiveSeconds - 有效时间(秒)Retrofitpublic static retrofit2.Retrofit buildRetrofit(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm, int jwtTokenLiveSeconds, okhttp3.Interceptor... interceptors)
public static retrofit2.Retrofit.Builder createRetrofitBuilder(String apiprefix, String jwtAppToken, String jwtPrivateKey, int jwtTokenLiveSeconds, okhttp3.Interceptor... interceptors)
public static retrofit2.Retrofit.Builder buildRetrofitBuilder(String apiprefix, String jwtAppToken, com.auth0.jwt.algorithms.Algorithm algorithm, int jwtTokenLiveSeconds, okhttp3.Interceptor... interceptors)
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)
apiprefix - jwtAppToken - jwtPrivateKey - jwtTokenLiveSeconds - gson - json_date_format - timeout - time_unit - public static retrofit2.Retrofit buildRetrofit(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)
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)
apiprefix - jwtAppToken - jwtPrivateKey - jwtTokenLiveSeconds - gson - json_date_format - timeout - time_unit - public static retrofit2.Retrofit.Builder buildRetrofitBuilder(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)
Copyright © 2022. All rights reserved.