public class PushClient
extends java.lang.Object
| Constructor and Description |
|---|
PushClient(java.lang.String masterSecret,
java.lang.String appKey)
Create a Push Client.
|
PushClient(java.lang.String masterSecret,
java.lang.String appKey,
boolean apnsProduction,
long timeToLive)
Deprecated.
|
PushClient(java.lang.String masterSecret,
java.lang.String appKey,
cn.jiguang.common.connection.HttpProxy proxy,
cn.jiguang.common.ClientConfig conf) |
PushClient(java.lang.String masterSecret,
java.lang.String appKey,
int maxRetryTimes)
Deprecated.
|
PushClient(java.lang.String masterSecret,
java.lang.String appKey,
int maxRetryTimes,
cn.jiguang.common.connection.HttpProxy proxy)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
CIDResult |
getCidList(int count,
java.lang.String type)
Get cid list, the data form of cid is appKey-uuid.
|
PushResult |
sendPush(PushPayload pushPayload) |
PushResult |
sendPush(java.lang.String payloadString) |
PushResult |
sendPushValidate(PushPayload pushPayload) |
PushResult |
sendPushValidate(java.lang.String payloadString) |
void |
setBaseUrl(java.lang.String baseUrl) |
void |
setDefaults(boolean apnsProduction,
long timeToLive)
Deprecated.
|
void |
setHttpClient(cn.jiguang.common.connection.IHttpClient client) |
public PushClient(java.lang.String masterSecret,
java.lang.String appKey)
masterSecret - API access secret of the appKey.appKey - The KEY of one application on JPush.@Deprecated
public PushClient(java.lang.String masterSecret,
java.lang.String appKey,
int maxRetryTimes)
masterSecret - API access secret of the appKey.appKey - The KEY of one application on JPush.maxRetryTimes - The max retry times.@Deprecated
public PushClient(java.lang.String masterSecret,
java.lang.String appKey,
int maxRetryTimes,
cn.jiguang.common.connection.HttpProxy proxy)
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(java.lang.String masterSecret,
java.lang.String appKey,
cn.jiguang.common.connection.HttpProxy proxy,
cn.jiguang.common.ClientConfig conf)
@Deprecated
public PushClient(java.lang.String masterSecret,
java.lang.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.@Deprecated
public void setDefaults(boolean apnsProduction,
long timeToLive)
apnsProduction - Global APNs environment setting. It will override PushPayload Options.timeToLive - Global time_to_live setting. It will override PushPayload Options.public void setBaseUrl(java.lang.String baseUrl)
public PushResult sendPush(PushPayload pushPayload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic PushResult sendPushValidate(PushPayload pushPayload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic PushResult sendPush(java.lang.String payloadString) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic PushResult sendPushValidate(java.lang.String payloadString) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic CIDResult getCidList(int count, java.lang.String type) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
count - the count of cid list, from 1 to 1000. default is 1.type - default is "push", option: "schedule"cn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic void setHttpClient(cn.jiguang.common.connection.IHttpClient client)
public void close()
Copyright © 2018. All Rights Reserved.