1616import com .google .gson .JsonParser ;
1717
1818/**
19- * Entrance for sending Push .
19+ * Entrance for JPush IM API .
2020 *
21- * For the following parameters, you can set them by instance creation.
22- * This action will override setting in PushPayload Optional.
23- * * apnsProduction If not present, the default is true.
24- * * timeToLive If not present, the default is 86400(s) (one day).
2521 *
26- * Can be used directly.
2722 */
2823public class IMClient {
29- public static final String HOST_NAME_SSL = "https://api.jpush.cn" ;
24+ public static final String HOST_NAME_SSL = "" ; //" https://im. api.jpush.cn";
3025 public static final String PUSH_PATH = "/v3/push" ;
3126 public static final String PUSH_VALIDATE_PATH = "/v3/push/validate" ;
3227
3328 private final NativeHttpClient _httpClient ;
34- private JsonParser _jsonParser = new JsonParser ();
29+ private static JsonParser _jsonParser = new JsonParser ();
3530
3631 // If not present, true by default.
3732 private boolean _apnsProduction = true ;
@@ -43,8 +38,9 @@ public class IMClient {
4338
4439 private String _baseUrl ;
4540
41+
4642 /**
47- * Create a Push Client.
43+ * Create a IM Client.
4844 *
4945 * @param masterSecret API access secret of the appKey.
5046 * @param appKey The KEY of one application on JPush.
@@ -58,7 +54,7 @@ public IMClient(String masterSecret, String appKey, int maxRetryTimes) {
5854 }
5955
6056 /**
61- * Create a Push Client with max retry times.
57+ * Create a IM Client with max retry times.
6258 *
6359 * @param masterSecret API access secret of the appKey.
6460 * @param appKey The KEY of one application on JPush.
@@ -73,7 +69,7 @@ public IMClient(String masterSecret, String appKey, int maxRetryTimes, HttpProxy
7369 }
7470
7571 /**
76- * Create a Push Client with global settings.
72+ * Create a IM Client with global settings.
7773 *
7874 * If you want different settings from default globally, this constructor is what you needed.
7975 *
0 commit comments