public class JMessageClient extends Object
| 构造器和说明 |
|---|
JMessageClient(String appkey,
String masterSecret)
Create a JMessage Client.
|
JMessageClient(String appkey,
String masterSecret,
cn.jpush.api.common.connection.HttpProxy proxy)
Create a JMessage Client with a proxy.
|
JMessageClient(String appkey,
String masterSecret,
cn.jpush.api.common.connection.HttpProxy proxy,
JMessageConfig config)
Create a JMessage Client by custom Client configuration.
|
JMessageClient(String appkey,
String masterSecret,
int maxRetryTimes)
Create a JMessage Client with custom maxRetryTimes.
|
JMessageClient(String appkey,
String masterSecret,
String hostname)
Create a JMessage Client with a custom hostname.
|
public JMessageClient(String appkey, String masterSecret)
appkey - The KEY of one application on JPush.masterSecret - API access secret of the appKey.public JMessageClient(String appkey, String masterSecret, int maxRetryTimes)
appkey - The KEY of one application on JPush.masterSecret - API access secret of the appKey.maxRetryTimes - The max retry times.public JMessageClient(String appkey, String masterSecret, cn.jpush.api.common.connection.HttpProxy proxy)
appkey - The KEY of one application on JPush.masterSecret - API access secret of the appKey.proxy - The proxy, if there is no proxy, should be null.public JMessageClient(String appkey, String masterSecret, String hostname)
appkey - The KEY of one application on JPush.masterSecret - API access secret of the appKey.hostname - The custom hostname.public JMessageClient(String appkey, String masterSecret, cn.jpush.api.common.connection.HttpProxy proxy, JMessageConfig config)
appkey - The KEY of one application on JPush.masterSecret - API access secret of the appKey.proxy - The proxy, if there is no proxy, should be null.config - The client configuration. Can use JMessageConfig.getInstance() as default.public String registerUsers(RegisterInfo[] users) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic String registerAdmins(String username, String password) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic UserInfoResult getUserInfo(String username) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic void updateUserPassword(String username, String password) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic void updateUserInfo(String username, String nickname, String birthday, String signature, int gender, String region, String address, String avatar) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic UserListResult getUserList(int start, int count) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic UserGroupsResult getGroupListByUser(String username) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic void deleteUser(String username) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic GroupInfoResult getGroupInfo(long gid) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic MemberListResult getGroupMembers(long gid) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic GroupListResult getGroupListByAppkey(int start, int count) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic CreateGroupResult createGroup(String owner, String gname, String desc, String... userlist) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic void addOrRemoveMembers(long gid,
String[] addList,
String[] removeList)
throws cn.jpush.api.common.resp.APIConnectionException,
cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic void deleteGroup(long gid)
throws cn.jpush.api.common.resp.APIConnectionException,
cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic void updateGroupInfo(long gid,
String groupName,
String groupDesc)
throws cn.jpush.api.common.resp.APIConnectionException,
cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic SendMessageResult sendMessage(Integer version, String targetType, String targetId, String fromType, String fromId, String messageType, MessageBody messageBody) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic SendMessageResult sendSingleTextByAdmin(String targetId, String fromId, MessageBody body) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic SendMessageResult sendGroupTextByAdmin(String targetId, String fromId, MessageBody body) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionCopyright © 2015. All Rights Reserved.