File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 26
26
< dependency>
27
27
< groupId> cn. jpush. api< / groupId>
28
28
< artifactId> jpush- client< / artifactId>
29
- < version> 3.2 . 16 < / version>
29
+ < version> 3.2 . 17 < / version>
30
30
< / dependency>
31
31
```
32
32
### jar 包方式
46
46
< dependency>
47
47
< groupId> cn. jpush. api< / groupId>
48
48
< artifactId> jiguang- common< / artifactId>
49
- < version> 1.0 . 2 < / version>
49
+ < version> 1.0 . 3 < / version>
50
50
< / dependency>
51
51
< dependency>
52
52
< groupId> io. netty< / groupId>
@@ -115,13 +115,15 @@ try {
115
115
PushResult result = jpushClient.sendPush(payload);
116
116
LOG.info("Got result - " + result);
117
117
Thread.sleep(5000);
118
- // 定义一个 close 方法,最终调用 NettyHttpClient 中的 close 方法即可 。
118
+ // 请求结束后,调用 NettyHttpClient 中的 close 方法,否则进程不会退出 。
119
119
jpushClient.close();
120
120
} catch(InterruptedException e) {
121
121
e.printStackTrace();
122
122
}
123
123
```
124
124
125
+ 3.2.17 版本后,在 PushClient 中添加了 setHttpClient(IHttpClient client) 方法,用户可以自由切换 NettyHttpClient 或是 NativeHttpClient。
126
+
125
127
### 推送样例
126
128
127
129
> 以下片断来自项目代码里的文件:example / cn.jpush.api.examples.PushExample
You can’t perform that action at this time.
0 commit comments