Skip to content

Commit b815eae

Browse files
committed
fix device example name
1 parent 2fabb7d commit b815eae

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,3 +301,19 @@
301301
LOG.info("Error Message: " + e.getErrorMessage());
302302
}
303303
```
304+
305+
### Custom Client 样例
306+
307+
> 一下片断来自项目代码里面的文件:example / cn.jpush.api.examples.DeviceExample
308+
```Java
309+
public static void testCustomClient() {
310+
ClientConfig config = ClientConfig.getInstance();
311+
config.setMaxRetryTimes(5);
312+
config.setConnectionTimeout(10 * 1000);// 10 seconds
313+
config.setSSLVersion("TLSv1.1");
314+
315+
ClientConfig.setReadTimeout(ClientConfig.getInstance(), 30 * 1000);// 30 seconds
316+
317+
JPushClient jPushClient = new JPushClient(masterSecret, appKey, null, config);
318+
}
319+
```

example/main/java/cn/jpush/api/examples/DevcieExample.java renamed to example/main/java/cn/jpush/api/examples/DeviceExample.java

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

1313
import java.util.Map;
1414

15-
public class DevcieExample {
16-
protected static final Logger LOG = LoggerFactory.getLogger(DevcieExample.class);
15+
public class DeviceExample {
16+
protected static final Logger LOG = LoggerFactory.getLogger(DeviceExample.class);
1717

1818
private static final String appKey = "dd1066407b044738b6479275";
1919
private static final String masterSecret = "6b135be0037a5c1e693c3dfa";

0 commit comments

Comments
 (0)