public class MessageApi extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.noear.water.dso.ApiCaller |
apiCaller |
| 构造器和说明 |
|---|
MessageApi() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
cancelMessage(String msg_key)
取消消息
|
boolean |
cancelMessage(String msg_key,
String subscriber_key)
取消XXX订阅者的消息
|
boolean |
checkMessage(MessageM msg,
String receive_key)
检测消息签名
|
String |
receiveMessage(Fun1<String,String> paramS,
String service_secretKey,
MessageHandler consumer) |
boolean |
sendMessage(String topic,
String message)
发送消息
|
boolean |
sendMessage(String msg_key,
String topic,
String message)
发送消息
|
boolean |
sendMessage(String msg_key,
String topic,
String message,
Date planTime)
发送消息
|
boolean |
sendMessageAndTags(String topic,
String message,
String tags) |
boolean |
sendMessageAndTags(String msg_key,
String topic,
String message,
Date planTime,
String tags)
发送消息
|
boolean |
sendMessageAndTags(String msg_key,
String topic,
String message,
String tags) |
boolean |
sendMessageAndTagsCallback(String msg_key,
String message,
Date planTime,
String receiver_url,
String receiver_cehck,
String tags)
发送消息回调
|
boolean |
sendMessageAndTagsCallback(String message,
String receiver_url,
String receiver_cehck,
String tags) |
boolean |
sendMessageCallback(String msg_key,
String message,
Date planTime,
String receiver_url,
String receiver_cehck) |
boolean |
sendMessageCallback(String message,
String receiver_url,
String receiver_cehck)
发送消息回调
|
boolean |
subscribeTopic(String subscriber_key,
String receive_url,
String receive_key,
String alarm_mobile,
int receive_way,
boolean is_unstable,
String... topics)
订阅
|
boolean |
subscribeTopic(String subscriber_key,
String subscriber_note,
String receive_url,
String receive_key,
String alarm_mobile,
int receive_way,
boolean is_unstable,
String... topics)
订阅
|
boolean |
succeedMessage(String msg_key)
完成消息(设为成功)
|
boolean |
succeedMessage(String msg_key,
String subscriber_key)
完成XXX订阅者的消息
|
boolean |
unSubscribeTopic(String subscriber_key,
String... topics)
取消麻阅
|
protected final org.noear.water.dso.ApiCaller apiCaller
public boolean subscribeTopic(String subscriber_key, String receive_url, String receive_key, String alarm_mobile, int receive_way, boolean is_unstable, String... topics) throws Exception
subscriber_key - 订阅者keyreceive_url - 接收地址receive_way - 接收方式 (0:http异步等待, 1:http同步等待, 2:http异步不等待)receive_key - 接收密钥,签名用Exceptionpublic boolean subscribeTopic(String subscriber_key, String subscriber_note, String receive_url, String receive_key, String alarm_mobile, int receive_way, boolean is_unstable, String... topics) throws Exception
subscriber_key - 订阅者keysubscriber_note - 订阅者简介receive_url - 接收地址receive_way - 接收方式 (0:http异步等待, 1:http同步等待, 2:http异步不等待)receive_key - 接收密钥alarm_mobile - 报警手机号topics - 主题..Exceptionpublic boolean unSubscribeTopic(String subscriber_key, String... topics) throws Exception
subscriber_key - 订阅者标识topics - 主题..Exceptionpublic boolean sendMessage(String topic, String message) throws Exception
topic - 消息主题message - 消息内容Exceptionpublic boolean sendMessage(String msg_key, String topic, String message) throws Exception
msg_key - 消息key(用于建立本地关键)topic - 消息主题message - 消息内容Exceptionpublic boolean sendMessage(String msg_key, String topic, String message, Date planTime) throws Exception
msg_key - 消息标识(用于建立本地关键)topic - 主题message - 消息内容planTime - 计划通知时间Exceptionpublic boolean sendMessageAndTags(String topic, String message, String tags) throws Exception
Exceptionpublic boolean sendMessageAndTags(String msg_key, String topic, String message, String tags) throws Exception
Exceptionpublic boolean sendMessageAndTags(String msg_key, String topic, String message, Date planTime, String tags) throws Exception
msg_key - 消息标识(用于建立本地关键)tags - 标签topic - 主题message - 消息内容planTime - 计划通知时间Exceptionpublic boolean sendMessageCallback(String message, String receiver_url, String receiver_cehck) throws Exception
Exceptionpublic boolean sendMessageCallback(String msg_key, String message, Date planTime, String receiver_url, String receiver_cehck) throws Exception
Exceptionpublic boolean sendMessageAndTagsCallback(String message, String receiver_url, String receiver_cehck, String tags) throws Exception
Exceptionpublic boolean sendMessageAndTagsCallback(String msg_key, String message, Date planTime, String receiver_url, String receiver_cehck, String tags) throws Exception
msg_key - 消息标识tags - 标签message - 消息receiver_url - 接收地址receiver_cehck - 接收检测planTime - 计划发送时间Exceptionpublic boolean cancelMessage(String msg_key, String subscriber_key) throws Exception
Exceptionpublic boolean succeedMessage(String msg_key) throws Exception
Exceptionpublic boolean succeedMessage(String msg_key, String subscriber_key) throws Exception
ExceptionCopyright © 2021. All rights reserved.