public class PushClient extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
HOST_NAME_SSL |
static String |
PUSH_PATH |
| 构造器和说明 |
|---|
PushClient(String masterSecret,
String appKey)
Create a Push Client.
|
PushClient(String masterSecret,
String appKey,
boolean apnsProduction,
long timeToLive)
Create a Push Client with global settings.
|
PushClient(String masterSecret,
String appKey,
int maxRetryTimes)
Create a Push Client with max retry times.
|
| 限定符和类型 | 方法和说明 |
|---|---|
PushResult |
sendPush(PushPayload pushPayload) |
PushResult |
sendPush(String payloadString) |
void |
setBaseUrl(String baseUrl) |
public PushClient(String masterSecret, String appKey)
masterSecret - API access secret of the appKey.appKey - The KEY of one application on JPush.public PushClient(String masterSecret, String appKey, int maxRetryTimes)
masterSecret - API access secret of the appKey.appKey - The KEY of one application on JPush.maxRetryTimes - max retry timespublic PushClient(String masterSecret, String appKey, boolean apnsProduction, long timeToLive)
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.public void setBaseUrl(String baseUrl)
public PushResult sendPush(PushPayload pushPayload) throws APIConnectionException, APIRequestException
public PushResult sendPush(String payloadString) throws APIConnectionException, APIRequestException
Copyright © 2014. All Rights Reserved.