public class PushClient extends Object
| 构造器和说明 |
|---|
PushClient(String masterSecret,
String appKey)
Create a Push Client.
|
PushClient(String masterSecret,
String appKey,
boolean apnsProduction,
long timeToLive)
已过时。
|
PushClient(String masterSecret,
String appKey,
HttpProxy proxy,
ClientConfig conf) |
PushClient(String masterSecret,
String appKey,
int maxRetryTimes)
已过时。
|
PushClient(String masterSecret,
String appKey,
int maxRetryTimes,
HttpProxy proxy)
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
PushResult |
sendPush(PushPayload pushPayload) |
PushResult |
sendPush(String payloadString) |
PushResult |
sendPushValidate(PushPayload pushPayload) |
PushResult |
sendPushValidate(String payloadString) |
void |
setBaseUrl(String baseUrl) |
void |
setDefaults(boolean apnsProduction,
long timeToLive)
已过时。
|
public PushClient(String masterSecret, String appKey)
masterSecret - API access secret of the appKey.appKey - The KEY of one application on JPush.@Deprecated public PushClient(String masterSecret, String appKey, int maxRetryTimes)
ClientConfig instead of this constructor.masterSecret - API access secret of the appKey.appKey - The KEY of one application on JPush.maxRetryTimes - The max retry times.@Deprecated public PushClient(String masterSecret, String appKey, int maxRetryTimes, HttpProxy proxy)
ClientConfig instead of this constructor.masterSecret - API access secret of the appKey.appKey - The KEY of one application on JPush.maxRetryTimes - max retry timesproxy - The max retry times.public PushClient(String masterSecret, String appKey, HttpProxy proxy, ClientConfig conf)
@Deprecated public PushClient(String masterSecret, String appKey, boolean apnsProduction, long timeToLive)
ClientConfig instead of this constructor.masterSecret - API access secret of the appKey.appKey - The KEY of one application on JPush.apnsProduction - Global APNs environment setting. It will override PushPayload Options.timeToLive - Global time_to_live setting. It will override PushPayload Options.@Deprecated public void setDefaults(boolean apnsProduction, long timeToLive)
ClientConfig.setGlobalPushSetting(boolean, long) instead of this method.apnsProduction - Global APNs environment setting. It will override PushPayload Options.timeToLive - Global time_to_live setting. It will override PushPayload Options.public void setBaseUrl(String baseUrl)
public PushResult sendPush(PushPayload pushPayload) throws APIConnectionException, APIRequestException
public PushResult sendPushValidate(PushPayload pushPayload) throws APIConnectionException, APIRequestException
public PushResult sendPush(String payloadString) throws APIConnectionException, APIRequestException
public PushResult sendPushValidate(String payloadString) throws APIConnectionException, APIRequestException
Copyright © 2016. All Rights Reserved.