REQ - requestRESP - responsepublic abstract class AbstractOutboundDispatcher<REQ,RESP> extends Object
| 构造器和说明 |
|---|
AbstractOutboundDispatcher() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected RESP |
doDispatch(String systemId,
String systemTxnId,
REQ request)
下游系统接口调用.
|
void |
init() |
abstract Object |
insertOutbound(String systemId,
String systemTxnId,
REQ request)
插入日志.
|
abstract RESP |
responseWithException(REQ request,
Exception exception)
根据异常获取响应.
|
abstract void |
updateOutbound(Object outboundEntity,
AbstractProcessor<REQ,RESP> processor,
RESP response)
更新日志.
|
@PostConstruct public void init()
public abstract RESP responseWithException(REQ request, Exception exception)
request - 请求exception - 异常public abstract Object insertOutbound(String systemId, String systemTxnId, REQ request)
systemId - 下游系统号systemTxnId - 下游系统流水号request - 请求public abstract void updateOutbound(Object outboundEntity, AbstractProcessor<REQ,RESP> processor, RESP response)
outboundEntity - 日志实体processor - 处理器response - 响应信息protected RESP doDispatch(String systemId, String systemTxnId, REQ request) throws OctopusDuplicatedOutboundException
systemId - 下游系统号systemTxnId - 下游系统流水号request - 下游系统请求OctopusDuplicatedOutboundException - 数据插入异常Copyright © 2021 KRProject. All rights reserved.