Skip to content

Commit 26272bb

Browse files
committed
refactor some packages and class files name
1 parent c1967bc commit 26272bb

File tree

41 files changed

+130
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+130
-133
lines changed

weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http/HttpType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
* Created by ecoolper on 2017/4/28.
55
*/
66
public enum HttpType {
7-
joddHttp, apacheHttp, okHttp;
7+
JODD_HTTP, APACHE_HTTP, OK_HTTP;
88
}

weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http/MediaDownloadRequestExecutor.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package me.chanjar.weixin.common.util.http;
22

33
import me.chanjar.weixin.common.util.http.apache.ApacheMediaDownloadRequestExecutor;
4-
import me.chanjar.weixin.common.util.http.jodd.JoddMediaDownloadRequestExecutor;
5-
import me.chanjar.weixin.common.util.http.okhttp.OkMediaDownloadRequestExecutor;
4+
import me.chanjar.weixin.common.util.http.jodd.JoddHttpMediaDownloadRequestExecutor;
5+
import me.chanjar.weixin.common.util.http.okhttp.OkHttpMediaDownloadRequestExecutor;
66

77
import java.io.File;
88

@@ -22,12 +22,12 @@ public MediaDownloadRequestExecutor(RequestHttp requestHttp, File tmpDirFile) {
2222

2323
public static RequestExecutor<File, String> create(RequestHttp requestHttp, File tmpDirFile) {
2424
switch (requestHttp.getRequestType()) {
25-
case apacheHttp:
25+
case APACHE_HTTP:
2626
return new ApacheMediaDownloadRequestExecutor(requestHttp, tmpDirFile);
27-
case joddHttp:
28-
return new JoddMediaDownloadRequestExecutor(requestHttp, tmpDirFile);
29-
case okHttp:
30-
return new OkMediaDownloadRequestExecutor(requestHttp, tmpDirFile);
27+
case JODD_HTTP:
28+
return new JoddHttpMediaDownloadRequestExecutor(requestHttp, tmpDirFile);
29+
case OK_HTTP:
30+
return new OkHttpMediaDownloadRequestExecutor(requestHttp, tmpDirFile);
3131
default:
3232
return null;
3333
}

weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http/MediaUploadRequestExecutor.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import me.chanjar.weixin.common.bean.result.WxMediaUploadResult;
44
import me.chanjar.weixin.common.util.http.apache.ApacheMediaUploadRequestExecutor;
5-
import me.chanjar.weixin.common.util.http.jodd.JoddMediaUploadRequestExecutor;
6-
import me.chanjar.weixin.common.util.http.okhttp.OkMediaUploadRequestExecutor;
5+
import me.chanjar.weixin.common.util.http.jodd.JoddHttpMediaUploadRequestExecutor;
6+
import me.chanjar.weixin.common.util.http.okhttp.OkHttpMediaUploadRequestExecutor;
77

88
import java.io.File;
99

@@ -21,12 +21,12 @@ public MediaUploadRequestExecutor(RequestHttp requestHttp) {
2121

2222
public static RequestExecutor<WxMediaUploadResult, File> create(RequestHttp requestHttp) {
2323
switch (requestHttp.getRequestType()) {
24-
case apacheHttp:
24+
case APACHE_HTTP:
2525
return new ApacheMediaUploadRequestExecutor(requestHttp);
26-
case joddHttp:
27-
return new JoddMediaUploadRequestExecutor(requestHttp);
28-
case okHttp:
29-
return new OkMediaUploadRequestExecutor(requestHttp);
26+
case JODD_HTTP:
27+
return new JoddHttpMediaUploadRequestExecutor(requestHttp);
28+
case OK_HTTP:
29+
return new OkHttpMediaUploadRequestExecutor(requestHttp);
3030
default:
3131
return null;
3232
}

weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http/RequestExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ public interface RequestExecutor<T, E> {
5454
* @throws WxErrorException
5555
* @throws IOException
5656
*//*
57-
T executeOkhttp(ConnectionPool pool, final OkhttpProxyInfo proxyInfo, String uri, E data) throws WxErrorException, IOException;
57+
T executeOkhttp(ConnectionPool pool, final OkHttpProxyInfo proxyInfo, String uri, E data) throws WxErrorException, IOException;
5858
*/
5959
}

weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http/SimpleGetRequestExecutor.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package me.chanjar.weixin.common.util.http;
22

3-
import me.chanjar.weixin.common.util.http.apache.ApacheSimpleGetRequestExecutor;
4-
import me.chanjar.weixin.common.util.http.jodd.JoddSimpleGetRequestExecutor;
5-
import me.chanjar.weixin.common.util.http.okhttp.OkSimpleGetRequestExecutor;
3+
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientSimpleGetRequestExecutor;
4+
import me.chanjar.weixin.common.util.http.jodd.JoddHttpSimpleGetRequestExecutor;
5+
import me.chanjar.weixin.common.util.http.okhttp.OkHttpSimpleGetRequestExecutor;
66

77
/**
88
* 简单的GET请求执行器,请求的参数是String, 返回的结果也是String
@@ -19,12 +19,12 @@ public SimpleGetRequestExecutor(RequestHttp requestHttp) {
1919

2020
public static RequestExecutor<String, String> create(RequestHttp requestHttp) {
2121
switch (requestHttp.getRequestType()) {
22-
case apacheHttp:
23-
return new ApacheSimpleGetRequestExecutor(requestHttp);
24-
case joddHttp:
25-
return new JoddSimpleGetRequestExecutor(requestHttp);
26-
case okHttp:
27-
return new OkSimpleGetRequestExecutor(requestHttp);
22+
case APACHE_HTTP:
23+
return new ApacheHttpClientSimpleGetRequestExecutor(requestHttp);
24+
case JODD_HTTP:
25+
return new JoddHttpSimpleGetRequestExecutor(requestHttp);
26+
case OK_HTTP:
27+
return new OkHttpSimpleGetRequestExecutor(requestHttp);
2828
default:
2929
return null;
3030
}

weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http/SimplePostRequestExecutor.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package me.chanjar.weixin.common.util.http;
22

33
import me.chanjar.weixin.common.util.http.apache.ApacheSimplePostRequestExecutor;
4-
import me.chanjar.weixin.common.util.http.jodd.JoddSimplePostRequestExecutor;
5-
import me.chanjar.weixin.common.util.http.okhttp.OkSimplePostRequestExecutor;
4+
import me.chanjar.weixin.common.util.http.jodd.JoddHttpSimplePostRequestExecutor;
5+
import me.chanjar.weixin.common.util.http.okhttp.OkHttpSimplePostRequestExecutor;
66

77
/**
88
* 用装饰模式实现
@@ -19,12 +19,12 @@ public SimplePostRequestExecutor(RequestHttp requestHttp) {
1919

2020
public static RequestExecutor<String, String> create(RequestHttp requestHttp) {
2121
switch (requestHttp.getRequestType()) {
22-
case apacheHttp:
22+
case APACHE_HTTP:
2323
return new ApacheSimplePostRequestExecutor(requestHttp);
24-
case joddHttp:
25-
return new JoddSimplePostRequestExecutor(requestHttp);
26-
case okHttp:
27-
return new OkSimplePostRequestExecutor(requestHttp);
24+
case JODD_HTTP:
25+
return new JoddHttpSimplePostRequestExecutor(requestHttp);
26+
case OK_HTTP:
27+
return new OkHttpSimplePostRequestExecutor(requestHttp);
2828
default:
2929
return null;
3030
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
/**
1616
* Created by ecoolper on 2017/5/4.
1717
*/
18-
public class ApacheSimpleGetRequestExecutor extends SimpleGetRequestExecutor<CloseableHttpClient, HttpHost> {
18+
public class ApacheHttpClientSimpleGetRequestExecutor extends SimpleGetRequestExecutor<CloseableHttpClient, HttpHost> {
1919

20-
public ApacheSimpleGetRequestExecutor(RequestHttp requestHttp) {
20+
public ApacheHttpClientSimpleGetRequestExecutor(RequestHttp requestHttp) {
2121
super(requestHttp);
2222
}
2323

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
/**
2424
* Created by ecoolper on 2017/5/5.
2525
*/
26-
public class JoddMediaDownloadRequestExecutor extends MediaDownloadRequestExecutor<HttpConnectionProvider, ProxyInfo> {
26+
public class JoddHttpMediaDownloadRequestExecutor extends MediaDownloadRequestExecutor<HttpConnectionProvider, ProxyInfo> {
2727

2828

29-
public JoddMediaDownloadRequestExecutor(RequestHttp requestHttp, File tmpDirFile) {
29+
public JoddHttpMediaDownloadRequestExecutor(RequestHttp requestHttp, File tmpDirFile) {
3030
super(requestHttp, tmpDirFile);
3131
}
3232

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
/**
1919
* Created by ecoolper on 2017/5/5.
2020
*/
21-
public class JoddMediaUploadRequestExecutor extends MediaUploadRequestExecutor<HttpConnectionProvider, ProxyInfo> {
22-
public JoddMediaUploadRequestExecutor(RequestHttp requestHttp) {
21+
public class JoddHttpMediaUploadRequestExecutor extends MediaUploadRequestExecutor<HttpConnectionProvider, ProxyInfo> {
22+
public JoddHttpMediaUploadRequestExecutor(RequestHttp requestHttp) {
2323
super(requestHttp);
2424
}
2525

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
/**
1414
* Created by ecoolper on 2017/5/4.
1515
*/
16-
public class JoddSimpleGetRequestExecutor extends SimpleGetRequestExecutor<HttpConnectionProvider, ProxyInfo> {
16+
public class JoddHttpSimpleGetRequestExecutor extends SimpleGetRequestExecutor<HttpConnectionProvider, ProxyInfo> {
1717

18-
public JoddSimpleGetRequestExecutor(RequestHttp requestHttp) {
18+
public JoddHttpSimpleGetRequestExecutor(RequestHttp requestHttp) {
1919
super(requestHttp);
2020
}
2121

0 commit comments

Comments
 (0)