mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-09-20 02:29:44 +08:00
refactor some packages and class files name
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package me.chanjar.weixin.cp.api.impl.apache;
|
||||
package me.chanjar.weixin.cp.api.impl;
|
||||
|
||||
|
||||
import me.chanjar.weixin.common.bean.WxAccessToken;
|
||||
@@ -18,7 +18,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class WxCpServiceImpl extends AbstractWxCpServiceImpl<CloseableHttpClient, HttpHost> {
|
||||
public class WxCpServiceApacheHttpClientImpl extends AbstractWxCpServiceImpl<CloseableHttpClient, HttpHost> {
|
||||
protected CloseableHttpClient httpClient;
|
||||
protected HttpHost httpProxy;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class WxCpServiceImpl extends AbstractWxCpServiceImpl<CloseableHttpClient
|
||||
|
||||
@Override
|
||||
public HttpType getRequestType() {
|
||||
return HttpType.apacheHttp;
|
||||
return HttpType.APACHE_HTTP;
|
||||
}
|
||||
|
||||
@Override
|
@@ -7,5 +7,5 @@ package me.chanjar.weixin.cp.api.impl;
|
||||
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a>
|
||||
* </pre>
|
||||
*/
|
||||
public class WxCpServiceImpl extends me.chanjar.weixin.cp.api.impl.apache.WxCpServiceImpl{
|
||||
public class WxCpServiceImpl extends WxCpServiceApacheHttpClientImpl {
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package me.chanjar.weixin.cp.api.impl.jodd;
|
||||
package me.chanjar.weixin.cp.api.impl;
|
||||
|
||||
import jodd.http.*;
|
||||
import me.chanjar.weixin.common.bean.WxAccessToken;
|
||||
@@ -8,7 +8,7 @@ import me.chanjar.weixin.common.util.http.HttpType;
|
||||
import me.chanjar.weixin.cp.api.WxCpConfigStorage;
|
||||
import me.chanjar.weixin.cp.api.impl.AbstractWxCpServiceImpl;
|
||||
|
||||
public class WxCpServiceImpl extends AbstractWxCpServiceImpl<HttpConnectionProvider, ProxyInfo> {
|
||||
public class WxCpServiceJoddHttpImpl extends AbstractWxCpServiceImpl<HttpConnectionProvider, ProxyInfo> {
|
||||
protected HttpConnectionProvider httpClient;
|
||||
protected ProxyInfo httpProxy;
|
||||
|
||||
@@ -25,7 +25,7 @@ public class WxCpServiceImpl extends AbstractWxCpServiceImpl<HttpConnectionProvi
|
||||
|
||||
@Override
|
||||
public HttpType getRequestType() {
|
||||
return HttpType.joddHttp;
|
||||
return HttpType.JODD_HTTP;
|
||||
}
|
||||
|
||||
@Override
|
@@ -1,19 +1,19 @@
|
||||
package me.chanjar.weixin.cp.api.impl.okhttp;
|
||||
package me.chanjar.weixin.cp.api.impl;
|
||||
|
||||
import me.chanjar.weixin.common.bean.WxAccessToken;
|
||||
import me.chanjar.weixin.common.bean.result.WxError;
|
||||
import me.chanjar.weixin.common.exception.WxErrorException;
|
||||
import me.chanjar.weixin.common.util.http.HttpType;
|
||||
import me.chanjar.weixin.common.util.http.okhttp.OkhttpProxyInfo;
|
||||
import me.chanjar.weixin.common.util.http.okhttp.OkHttpProxyInfo;
|
||||
import me.chanjar.weixin.cp.api.WxCpConfigStorage;
|
||||
import me.chanjar.weixin.cp.api.impl.AbstractWxCpServiceImpl;
|
||||
import okhttp3.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class WxCpServiceImpl extends AbstractWxCpServiceImpl<ConnectionPool, OkhttpProxyInfo> {
|
||||
public class WxCpServiceOkHttpImpl extends AbstractWxCpServiceImpl<ConnectionPool, OkHttpProxyInfo> {
|
||||
protected ConnectionPool httpClient;
|
||||
protected OkhttpProxyInfo httpProxy;
|
||||
protected OkHttpProxyInfo httpProxy;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -22,13 +22,13 @@ public class WxCpServiceImpl extends AbstractWxCpServiceImpl<ConnectionPool, Okh
|
||||
}
|
||||
|
||||
@Override
|
||||
public OkhttpProxyInfo getRequestHttpProxy() {
|
||||
public OkHttpProxyInfo getRequestHttpProxy() {
|
||||
return httpProxy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpType getRequestType() {
|
||||
return HttpType.okHttp;
|
||||
return HttpType.OK_HTTP;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -92,7 +92,7 @@ public class WxCpServiceImpl extends AbstractWxCpServiceImpl<ConnectionPool, Okh
|
||||
WxCpConfigStorage configStorage = this.configStorage;
|
||||
|
||||
if (configStorage.getHttpProxyHost() != null && configStorage.getHttpProxyPort() > 0) {
|
||||
httpProxy = new OkhttpProxyInfo(OkhttpProxyInfo.ProxyType.SOCKS5, configStorage.getHttpProxyHost(), configStorage.getHttpProxyPort(), configStorage.getHttpProxyUsername(), configStorage.getHttpProxyPassword());
|
||||
httpProxy = new OkHttpProxyInfo(OkHttpProxyInfo.ProxyType.SOCKS5, configStorage.getHttpProxyHost(), configStorage.getHttpProxyPort(), configStorage.getHttpProxyUsername(), configStorage.getHttpProxyPassword());
|
||||
}
|
||||
|
||||
httpClient = new ConnectionPool();
|
Reference in New Issue
Block a user