public class MsgPusherClientImpl extends Object implements MsgPusherClient
| Constructor and Description |
|---|
MsgPusherClientImpl() |
| Modifier and Type | Method and Description |
|---|---|
com.centit.framework.common.ResponseData |
broadcastMessage(String sender,
com.centit.framework.model.basedata.NoticeMessage message,
com.centit.support.common.DoubleAspect userInline)
广播信息
|
org.apache.http.impl.client.CloseableHttpClient |
getHttpClient() |
void |
initAppSession(String appServerUrl,
String userCode,
String password) |
String |
registerUser(org.apache.http.impl.client.CloseableHttpClient httpClient,
UserMsgPoint msgPoint)
注册用户信息
在用户登录后 调用这个方法在消息推送中心注册用户信息
1, pc端登录后在 登录成功式 调用这个接口
2, 移动端登录成够后,链接百度推送获取推送标识channel id,这个会传送到服务端,服务端通过这个接口保存到推送服务器
这个其实并不是必须的,也可以在客户端直接调用消息推送中心的接口,这个将是我们推荐的做法,这样业务系统更本不要管
消息服务的运行机制,它只管直接调用消息推送接口就可以了。
|
String |
registerUser(String userCode,
String osId)
注册用户信息
|
String |
registerUser(String userCode,
String osId,
String deviceId,
String deviceType,
String channelId)
移动用户注册
|
String |
registerUser(UserMsgPoint msgPoint) |
String |
registerUserEmail(String userCode,
String osId,
String emailAddress)
邮箱用户注册
|
String |
registerUserPhone(String userCode,
String osId,
String mobilePhone)
短信用户注册
|
String |
registerUserWeChat(String userCode,
String osId,
String wxToken)
微信用户注册
|
void |
releaseHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient) |
com.centit.framework.common.ResponseData |
sendMessage(String sender,
Collection<String> receivers,
com.centit.framework.model.basedata.NoticeMessage message)
批量发送内部系统消息
|
com.centit.framework.common.ResponseData |
sendMessage(String sender,
String receiver,
com.centit.framework.model.basedata.NoticeMessage message)
发送内部系统消息
|
public org.apache.http.impl.client.CloseableHttpClient getHttpClient()
throws Exception
Exceptionpublic void releaseHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
public String registerUser(org.apache.http.impl.client.CloseableHttpClient httpClient, UserMsgPoint msgPoint) throws Exception
MsgPusherClientregisterUser in interface MsgPusherClienthttpClient - CloseableHttpClientmsgPoint - 用户消息接收端口Exception - Exceptionpublic String registerUser(UserMsgPoint msgPoint) throws Exception
registerUser in interface MsgPusherClientExceptionpublic String registerUser(String userCode, String osId, String deviceId, String deviceType, String channelId) throws Exception
MsgPusherClientregisterUser in interface MsgPusherClientuserCode - 用户代码osId - 业务系统IDdeviceId - 设备标识码deviceType - 移动设备类型 3 :android, 4:apple,0:没有channelId - 百度推送通道Exception - Exceptionpublic String registerUser(String userCode, String osId) throws Exception
MsgPusherClientregisterUser in interface MsgPusherClientuserCode - 用户代码osId - 业务系统IDException - Exceptionpublic String registerUserEmail(String userCode, String osId, String emailAddress) throws Exception
MsgPusherClientregisterUserEmail in interface MsgPusherClientuserCode - 用户代码osId - 业务系统IDemailAddress - 邮箱地址Exception - Exceptionpublic String registerUserPhone(String userCode, String osId, String mobilePhone) throws Exception
MsgPusherClientregisterUserPhone in interface MsgPusherClientuserCode - 用户代码osId - 业务系统IDmobilePhone - 移动电话Exception - Exceptionpublic String registerUserWeChat(String userCode, String osId, String wxToken) throws Exception
MsgPusherClientregisterUserWeChat in interface MsgPusherClientuserCode - 用户代码osId - 业务系统IDwxToken - 微信令牌 公众号下的令牌Exception - Exceptionpublic com.centit.framework.common.ResponseData sendMessage(String sender, String receiver, com.centit.framework.model.basedata.NoticeMessage message)
sendMessage in interface com.centit.framework.model.adapter.MessageSendersender - 发送人内部用户编码receiver - 接收人内部用户编码message - 消息主体public com.centit.framework.common.ResponseData sendMessage(String sender, Collection<String> receivers, com.centit.framework.model.basedata.NoticeMessage message)
sendMessage in interface com.centit.framework.model.adapter.MessageSendersender - 发送人内部用户编码receivers - 接收人内部用户编码message - 消息主体public com.centit.framework.common.ResponseData broadcastMessage(String sender, com.centit.framework.model.basedata.NoticeMessage message, com.centit.support.common.DoubleAspect userInline)
broadcastMessage in interface com.centit.framework.model.adapter.MessageSendersender - 发送人内部用户编码message - 消息主体userInline - DoubleAspec.ON 在线用户 OFF 离线用户 BOTH 所有用户Copyright © 2024 Centit Information Technical, co. Inc.. All rights reserved.