public abstract class BaseWebhookExecutor<RequestBody extends BaseWebhookRequestBody,Response> extends Object
| 构造器和说明 |
|---|
BaseWebhookExecutor() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
afterHandler(ExecuteParam executeParam,
ExecuteResponse<Response> executeResponse)
请求之后的处理方法
|
protected void |
beforeHandler(ExecuteParam executeParam)
请求之前的处理方法
|
protected void |
checkFailHandler(ExecuteResponse<Response> executeResponse)
校验响应结果失败之后的处理
|
protected abstract boolean |
checkResponseObjectHandler(ExecuteResponse<Response> executeResponse)
校验解析后的响应结果
|
protected void |
checkSuccessHandler(ExecuteResponse<Response> executeResponse)
校验响应结果成功之后的处理
|
protected void |
execute(ExecuteParam executeParam)
执行发送消息
|
void |
execute(String url,
RequestBody requestBody)
执行请求
|
void |
execute(String url,
String secret,
RequestBody requestBody)
执行请求
|
protected Response |
getParsedResponse(ExecuteResponse<Response> executeResponse) |
protected Response |
parseResponseHandler(ExecuteResponse<Response> executeResponse)
解析响应结果
|
protected abstract WebhookProductEnum |
webhookProductEnum()
webhook 产品信息
|
protected void beforeHandler(ExecuteParam executeParam)
executeParam - executeParamprotected void afterHandler(ExecuteParam executeParam, ExecuteResponse<Response> executeResponse)
executeParam - executeParamexecuteResponse - executeResponseprotected abstract boolean checkResponseObjectHandler(ExecuteResponse<Response> executeResponse)
executeResponse - executeResponseprotected Response parseResponseHandler(ExecuteResponse<Response> executeResponse)
executeResponse - executeResponseprotected void checkFailHandler(ExecuteResponse<Response> executeResponse)
executeResponse - executeResponseprotected void checkSuccessHandler(ExecuteResponse<Response> executeResponse)
executeResponse - executeResponseprotected abstract WebhookProductEnum webhookProductEnum()
protected void execute(ExecuteParam executeParam)
executeParam - executeParampublic void execute(String url, RequestBody requestBody)
url - 请求地址requestBody - 请求报文public void execute(String url, String secret, RequestBody requestBody)
url - 请求地址secret - 密钥requestBody - 请求对象protected Response getParsedResponse(ExecuteResponse<Response> executeResponse)
Copyright © 2022. All rights reserved.