类 TransportImpl
java.lang.Object
com.webank.wedpr.sdk.jni.transport.impl.TransportImpl
- 所有已实现的接口:
WeDPRTransport
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidasyncGetPeers(GetPeersCallback handler) async get peers informationvoidasyncSendMessageByAgency(String topic, String agency, byte[] payload, int seq, int timeout, MessageErrorCallback errorCallback, MessageCallback msgCallback) send message by the agencyvoidasyncSendMessageByComponent(String topic, String dstInst, String component, byte[] payload, int seq, int timeout, MessageErrorCallback errorCallback, MessageCallback msgCallback) voidasyncSendMessageByNodeID(String topic, byte[] dstNode, byte[] payload, int seq, int timeout, MessageErrorCallback errorCallback, MessageCallback msgCallback) async send message by the nodeIDvoidasyncSendMessageByTopic(String topic, String dstInst, byte[] payload, int seq, int timeout, MessageErrorCallback errorCallback, MessageCallback msgCallback) send message by the topic(will register firstly)voidasyncSendResponse(byte[] dstNode, String traceID, byte[] payload, int seq, MessageErrorCallback errorCallback) send response to given nodestatic WeDPRTransportbuild(TransportConfig transportConfig) getAliveEntryPoints(String serviceName) voidpushByComponent(String topic, String dstInst, String component, int seq, byte[] payload, int timeout) voidpushByInst(String topic, String dstInst, int seq, byte[] payload, int timeout) voidpushByNodeID(String topic, byte[] dstNodeID, int seq, byte[] payload, int timeout) voidregisterComponent(String component) register the componentvoidregisterComponentHandler(String component, MessageDispatcherCallback messageDispatcherCallback) register handlers according to componentvoidregisterService(String serviceName, String entryPoint) voidregisterTopic(String topic) register the topicvoidregisterTopicHandler(String topic, MessageDispatcherCallback messageHandler) register the message handlervoidremoveTopic(String topic) selectNodeListByPolicy(RouteType routeType, String dstInst, String dstComponent, String dstNode) voidstart()voidstop()voidunRegisterComponent(String component) unregister the componentvoidunRegisterTopic(String topic) unRegister the topic
-
构造器详细资料
-
TransportImpl
protected TransportImpl(Transport transport, TransportConfig transportConfig) throws WeDPRSDKException
-
-
方法详细资料
-
build
-
start
public void start()- 指定者:
start在接口中WeDPRTransport
-
stop
public void stop()- 指定者:
stop在接口中WeDPRTransport
-
registerComponent
从接口复制的说明:WeDPRTransportregister the component- 指定者:
registerComponent在接口中WeDPRTransport- 参数:
component- the component used to router
-
unRegisterComponent
从接口复制的说明:WeDPRTransportunregister the component- 指定者:
unRegisterComponent在接口中WeDPRTransport- 参数:
component- the component used to route
-
registerTopic
register the topic- 指定者:
registerTopic在接口中WeDPRTransport- 参数:
topic- the topic used to route- 抛出:
Exception- failed case
-
unRegisterTopic
unRegister the topic- 指定者:
unRegisterTopic在接口中WeDPRTransport- 参数:
topic- the topic used to route- 抛出:
Exception- failed case
-
registerComponentHandler
public void registerComponentHandler(String component, MessageDispatcherCallback messageDispatcherCallback) register handlers according to component- 指定者:
registerComponentHandler在接口中WeDPRTransport- 参数:
component- the component of the message should handled by the given callbackmessageDispatcherCallback- the message callback
-
asyncGetPeers
async get peers information- 指定者:
asyncGetPeers在接口中WeDPRTransport- 参数:
handler- the handler that handle the peersInfo
-
registerTopicHandler
从接口复制的说明:WeDPRTransportregister the message handler- 指定者:
registerTopicHandler在接口中WeDPRTransport- 参数:
topic- the topicmessageHandler- the message handler
-
asyncSendMessageByNodeID
public void asyncSendMessageByNodeID(String topic, byte[] dstNode, byte[] payload, int seq, int timeout, MessageErrorCallback errorCallback, MessageCallback msgCallback) async send message by the nodeID- 指定者:
asyncSendMessageByNodeID在接口中WeDPRTransport- 参数:
topic- the topicdstNode- the dstNodepayload- the payloadseq- the seq of the payloadtimeout- the timeout settingerrorCallback- the handler called after receive the message related to the topic
-
asyncSendMessageByAgency
public void asyncSendMessageByAgency(String topic, String agency, byte[] payload, int seq, int timeout, MessageErrorCallback errorCallback, MessageCallback msgCallback) send message by the agency- 指定者:
asyncSendMessageByAgency在接口中WeDPRTransport- 参数:
topic- the topicagency- the agencypayload- the payloadseq- the seqtimeout- the timeouterrorCallback- the handler called after receive the message related to the topic
-
asyncSendMessageByComponent
public void asyncSendMessageByComponent(String topic, String dstInst, String component, byte[] payload, int seq, int timeout, MessageErrorCallback errorCallback, MessageCallback msgCallback) - 指定者:
asyncSendMessageByComponent在接口中WeDPRTransport
-
asyncSendMessageByTopic
public void asyncSendMessageByTopic(String topic, String dstInst, byte[] payload, int seq, int timeout, MessageErrorCallback errorCallback, MessageCallback msgCallback) send message by the topic(will register firstly)- 指定者:
asyncSendMessageByTopic在接口中WeDPRTransport- 参数:
topic- the topic(used to route toopayload- the payload(the payload)seq- the seq(the seq)timeout- the timeouterrorCallback- the handler
-
asyncSendResponse
public void asyncSendResponse(byte[] dstNode, String traceID, byte[] payload, int seq, MessageErrorCallback errorCallback) 从接口复制的说明:WeDPRTransportsend response to given node- 指定者:
asyncSendResponse在接口中WeDPRTransport- 参数:
dstNode- the node that should receive the responsetraceID- the traceID of the responsepayload- the payloadseq- the seqerrorCallback- the error callback
-
removeTopic
- 指定者:
removeTopic在接口中WeDPRTransport- 参数:
topic- the topic to remove- 抛出:
WeDPRSDKException
-
pushByNodeID
public void pushByNodeID(String topic, byte[] dstNodeID, int seq, byte[] payload, int timeout) throws WeDPRSDKException - 指定者:
pushByNodeID在接口中WeDPRTransport- 抛出:
WeDPRSDKException
-
pushByComponent
public void pushByComponent(String topic, String dstInst, String component, int seq, byte[] payload, int timeout) throws WeDPRSDKException - 指定者:
pushByComponent在接口中WeDPRTransport- 抛出:
WeDPRSDKException
-
pushByInst
public void pushByInst(String topic, String dstInst, int seq, byte[] payload, int timeout) throws WeDPRSDKException - 指定者:
pushByInst在接口中WeDPRTransport- 抛出:
WeDPRSDKException
-
pop
- 指定者:
pop在接口中WeDPRTransport- 抛出:
WeDPRSDKException
-
peek
- 指定者:
peek在接口中WeDPRTransport
-
selectNodeListByPolicy
public List<String> selectNodeListByPolicy(RouteType routeType, String dstInst, String dstComponent, String dstNode) - 指定者:
selectNodeListByPolicy在接口中WeDPRTransport
-
getAliveEntryPoints
- 指定者:
getAliveEntryPoints在接口中WeDPRTransport
-
registerService
- 指定者:
registerService在接口中WeDPRTransport- 抛出:
Exception
-
getTransportConfig
- 指定者:
getTransportConfig在接口中WeDPRTransport
-