public interface Amop
| 限定符和类型 | 字段和说明 |
|---|---|
static org.slf4j.Logger |
logger |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
broadcastAmopMsg(java.lang.String topic,
byte[] content)
Send amop msg
|
static Amop |
build(ConfigOption configOption)
Create a Amop object.
|
static Amop |
build(long nativePointer)
Create an Amop object.
|
void |
destroy()
Destroy amop object
|
java.util.Set<java.lang.String> |
getSubTopics()
Get all subscribe topics.
|
void |
sendAmopMsg(java.lang.String topic,
byte[] content,
int timeout,
io.github.alleriawindrunner.sdk.jni.amop.AmopResponseCallback callback)
Send amop msg
|
void |
sendResponse(java.lang.String endpoint,
java.lang.String seq,
byte[] content)
Send response msg
|
void |
setCallback(io.github.alleriawindrunner.sdk.jni.amop.AmopRequestCallback cb)
set amop default callback
|
void |
start()
Start.
|
void |
stop()
Stop.
|
void |
subscribeTopic(java.util.Set<java.lang.String> topics)
Subscribe a normal topic.
|
void |
subscribeTopic(java.lang.String topicName,
io.github.alleriawindrunner.sdk.jni.amop.AmopRequestCallback callback)
Subscribe a normal topic.
|
void |
unsubscribeTopic(java.lang.String topicName)
Unsubscribe a topic.
|
static Amop build(ConfigOption configOption) throws io.github.alleriawindrunner.sdk.jni.common.JniException
configOption - the config objectio.github.alleriawindrunner.sdk.jni.common.JniException - throw when build AMOP service failedstatic Amop build(long nativePointer) throws io.github.alleriawindrunner.sdk.jni.common.JniException
nativePointer - theio.github.alleriawindrunner.sdk.jni.common.JniException - throw when build AMOP service failedvoid subscribeTopic(java.util.Set<java.lang.String> topics)
topics - the topic namevoid subscribeTopic(java.lang.String topicName,
io.github.alleriawindrunner.sdk.jni.amop.AmopRequestCallback callback)
topicName - the topic namecallback - callback is called when receive a msg relate to this topicvoid unsubscribeTopic(java.lang.String topicName)
topicName - the topic namevoid sendAmopMsg(java.lang.String topic,
byte[] content,
int timeout,
io.github.alleriawindrunner.sdk.jni.amop.AmopResponseCallback callback)
topic - topic nametimeout - timeout configcontent - the message be sentcallback - the callback that will be called when receive the AMOP responsevoid sendResponse(java.lang.String endpoint,
java.lang.String seq,
byte[] content)
endpoint - send endpointseq - response seqcontent - response contentvoid broadcastAmopMsg(java.lang.String topic,
byte[] content)
topic - topic namecontent - the AMOP message to be broadcastjava.util.Set<java.lang.String> getSubTopics()
void setCallback(io.github.alleriawindrunner.sdk.jni.amop.AmopRequestCallback cb)
cb - the amop callbackvoid start()
void stop()
void destroy()