REQ - 请求泛型RESP - 响应泛型public abstract class AbstractInboundActivator<REQ extends OctopusSkeletonOnlineRequest<RESP>,RESP extends OctopusSkeletonOnlineResponse> extends Object
| 构造器和说明 |
|---|
AbstractInboundActivator() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected RESP |
doActivate(String channelId,
String channelTxnId,
REQ request)
主服务流程.
|
void |
init() |
abstract Object |
insertInbound(String channelId,
String channelTxnId,
REQ request)
插入日志.
|
abstract RESP |
responseWithException(REQ request,
Exception exception)
根据异常获取响应.
|
abstract void |
updateInbound(Object inboundEntity,
AbstractHandler<REQ,RESP> handler,
RESP response)
更新日志.
|
@PostConstruct public void init()
public abstract RESP responseWithException(REQ request, Exception exception)
request - 请求exception - 异常public abstract Object insertInbound(String channelId, String channelTxnId, REQ request)
channelId - 上游渠道号channelTxnId - 上游渠道流水号request - 请求对象public abstract void updateInbound(Object inboundEntity, AbstractHandler<REQ,RESP> handler, RESP response)
inboundEntity - 日志实体handler - 处理器response - 响应对象protected RESP doActivate(String channelId, String channelTxnId, REQ request) throws OctopusBadRequestException, OctopusDuplicatedInboundException
channelId - 上游渠道号channelTxnId - 上游渠道流水号request - 请求OctopusBadRequestException - 请求校验异常OctopusDuplicatedInboundException - 数据插入异常Copyright © 2021 KRProject. All rights reserved.