public final class WechatPayRetrofitFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
private String |
baseUrl |
private okhttp3.ConnectionPool |
connectionPool |
private static String |
DEFAULT_BASE_URL |
private okhttp3.logging.HttpLoggingInterceptor.Level |
level |
private TenpayKeyCache |
tenpayKeyCache |
| Constructor and Description |
|---|
WechatPayRetrofitFactory(String baseUrl,
TenpayKeyCache tenpayKeyCache)
Instantiates a new Wechat pay retrofit factory.
|
WechatPayRetrofitFactory(String baseUrl,
TenpayKeyCache tenpayKeyCache,
okhttp3.ConnectionPool connectionPool,
okhttp3.logging.HttpLoggingInterceptor.Level level)
Instantiates a new Wechat pay retrofit factory.
|
WechatPayRetrofitFactory(TenpayKeyCache tenpayKeyCache)
Instantiates a new Wechat pay retrofit factory.
|
| Modifier and Type | Method and Description |
|---|---|
retrofit2.Retrofit |
app(AppMerchant appMerchant)
带拦截器的Retrofit客户端
|
private static okhttp3.OkHttpClient |
okHttpClient(okhttp3.ConnectionPool connectionPool,
okhttp3.logging.HttpLoggingInterceptor.Level level) |
private static okhttp3.OkHttpClient |
okHttpClient(String baseUrl,
AppMerchant appMerchant,
TenpayKeyCache tenpayKeyCache,
okhttp3.ConnectionPool connectionPool,
okhttp3.logging.HttpLoggingInterceptor.Level level) |
static retrofit2.Retrofit |
withNoAuth()
不走过滤器的Retrofit
|
private static final String DEFAULT_BASE_URL
private final String baseUrl
private final TenpayKeyCache tenpayKeyCache
private final okhttp3.ConnectionPool connectionPool
private final okhttp3.logging.HttpLoggingInterceptor.Level level
public WechatPayRetrofitFactory(TenpayKeyCache tenpayKeyCache)
tenpayKeyCache - the tenpay key cachepublic WechatPayRetrofitFactory(String baseUrl, TenpayKeyCache tenpayKeyCache)
baseUrl - the base urltenpayKeyCache - the tenpay key cachepublic WechatPayRetrofitFactory(String baseUrl, TenpayKeyCache tenpayKeyCache, okhttp3.ConnectionPool connectionPool, okhttp3.logging.HttpLoggingInterceptor.Level level)
baseUrl - the base urltenpayKeyCache - the tenpay key cacheconnectionPool - the connection poollevel - the levelpublic retrofit2.Retrofit app(AppMerchant appMerchant)
appMerchant - the app merchantpublic static retrofit2.Retrofit withNoAuth()
private static okhttp3.OkHttpClient okHttpClient(okhttp3.ConnectionPool connectionPool,
okhttp3.logging.HttpLoggingInterceptor.Level level)
private static okhttp3.OkHttpClient okHttpClient(String baseUrl, AppMerchant appMerchant, TenpayKeyCache tenpayKeyCache, okhttp3.ConnectionPool connectionPool, okhttp3.logging.HttpLoggingInterceptor.Level level)
Copyright © 2023. All rights reserved.