类 WechatPayClient.Executor<M>
- java.lang.Object
-
- cn.crushes.cloud.core.pay.wechat.v3.WechatPayClient.Executor<M>
-
- 类型参数:
M- the type parameter
- 封闭类:
- WechatPayClient
public static class WechatPayClient.Executor<M> extends Object
The type Executor.- 作者:
- felord.cn
-
-
字段概要
字段 修饰符和类型 字段 说明 private MmodelThe Model.private java.util.function.BiFunction<WechatPayV3Type,M,org.springframework.http.RequestEntity<?>>requestEntityBiFunctionThe Request entity bi function.private java.util.function.Consumer<org.springframework.http.ResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>>responseBodyConsumerThe Response body consumer.private org.springframework.web.client.RestOperationsrestOperationsThe Rest operations.private SignatureProvidersignatureProviderThe Signature provider.private WechatPayV3TypewechatPayV3TypeThe V3 pay type.
-
构造器概要
构造器 构造器 说明 Executor(WechatPayV3Type wechatPayV3Type, M model, SignatureProvider signatureProvider, org.springframework.web.client.RestOperations restOperations)Instantiates a new Executor.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 WechatPayClient.Executor<M>consumer(java.util.function.Consumer<org.springframework.http.ResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>> responseBodyConsumer)Consumer executor.private <T> StringdoDownload(WechatRequestEntity<T> requestEntity)下载文件返回的是字符串类型的.private <T> voiddoExecute(WechatRequestEntity<T> requestEntity)Do execute.private <T> org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>doResource(WechatRequestEntity<T> requestEntity)下载文件返回的是流类型的.Stringdownload()Download string.WechatPayClient.Executor<M>function(java.util.function.BiFunction<WechatPayV3Type,M,org.springframework.http.RequestEntity<?>> requestEntityBiFunction)Function executor.private <T> WechatRequestEntity<T>header(boolean newLine, WechatRequestEntity<T> requestEntity)构造私钥签名.voidrequest()Request.org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>resource()Download string.
-
-
-
字段详细资料
-
wechatPayV3Type
private final WechatPayV3Type wechatPayV3Type
The V3 pay type.
-
restOperations
private final org.springframework.web.client.RestOperations restOperations
The Rest operations.
-
signatureProvider
private final SignatureProvider signatureProvider
The Signature provider.
-
model
private final M model
The Model.
-
requestEntityBiFunction
private java.util.function.BiFunction<WechatPayV3Type,M,org.springframework.http.RequestEntity<?>> requestEntityBiFunction
The Request entity bi function.
-
responseBodyConsumer
private java.util.function.Consumer<org.springframework.http.ResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>> responseBodyConsumer
The Response body consumer.
-
-
构造器详细资料
-
Executor
Executor(WechatPayV3Type wechatPayV3Type, M model, SignatureProvider signatureProvider, org.springframework.web.client.RestOperations restOperations)
Instantiates a new Executor.- 参数:
wechatPayV3Type- the v 3 pay typemodel- the modelsignatureProvider- the signature providerrestOperations- the rest operations
-
-
方法详细资料
-
function
public WechatPayClient.Executor<M> function(java.util.function.BiFunction<WechatPayV3Type,M,org.springframework.http.RequestEntity<?>> requestEntityBiFunction)
Function executor.- 参数:
requestEntityBiFunction- the request entity bifunction- 返回:
- the executor
-
consumer
public WechatPayClient.Executor<M> consumer(java.util.function.Consumer<org.springframework.http.ResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>> responseBodyConsumer)
Consumer executor.- 参数:
responseBodyConsumer- the response body consumer- 返回:
- the executor
-
request
public void request()
Request.
-
download
public String download()
Download string.- 返回:
- the string
-
resource
public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> resource()
Download string.- 返回:
- the string
-
header
private <T> WechatRequestEntity<T> header(boolean newLine, WechatRequestEntity<T> requestEntity)
构造私钥签名.- 类型参数:
T- the type parameter- 参数:
requestEntity- the request entity- 返回:
- the wechat request entity
-
doExecute
private <T> void doExecute(WechatRequestEntity<T> requestEntity)
Do execute.- 类型参数:
T- the type parameter- 参数:
requestEntity- the request entity
-
doDownload
private <T> String doDownload(WechatRequestEntity<T> requestEntity)
下载文件返回的是字符串类型的.- 类型参数:
T- the type parameter- 参数:
requestEntity- the request entity- 返回:
- the string
-
doResource
private <T> org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> doResource(WechatRequestEntity<T> requestEntity)
下载文件返回的是流类型的.- 类型参数:
T- the type parameter- 参数:
requestEntity- the request entity- 返回:
- the resource
-
-