Dep数据发布,推送

时间:2023-03-09 23:28:01
Dep数据发布,推送
package com.cfets.ts.u.shchgateway.util;

import com.cfets.cwap.s.stp.MessageUnit;
import com.cfets.ts.s.depappApi.MessageSender; /**
*
* @author huateng
*
*/
public class DepUtils { private DepUtils(){
} /**
* 发布
*
* @param endPoint
* @param bizType
* @param obj
* @author huateng 2017年4月26日
*/
public static void publish(String endPoint, String bizType, Object obj) {
MessageUnit mu = MessageUnit.blank().body(obj);
MessageSender.get().publish(endPoint, mu);
} /**
* 发送
*
* @param endPoint
* @param obj
* @author huateng 2017年4月26日
*/
public static void send(String endPoint, Object obj) {
MessageUnit mu = MessageUnit.blank().body(obj);
MessageSender.get().synSend(endPoint, mu);
} /**
* 请求
*
* @param endPoint
* @param obj
* @author huateng 2017年4月26日
*/
public static Object request(String endPoint, Object obj) {
MessageUnit mu = MessageUnit.blank().body(obj);
MessageUnit result = MessageSender.get().request(endPoint, mu);
return result.getBody();
}
}

相关文章