M - the type parameterpublic static class WechatPayClient.Executor<M> extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private M |
model
The Model.
|
private java.util.function.BiFunction<WechatPayV3Type,M,org.springframework.http.RequestEntity<?>> |
requestEntityBiFunction
The Request entity bi function.
|
private java.util.function.Consumer<org.springframework.http.ResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>> |
responseBodyConsumer
The Response body consumer.
|
private org.springframework.web.client.RestOperations |
restOperations
The Rest operations.
|
private SignatureProvider |
signatureProvider
The Signature provider.
|
private WechatPayV3Type |
wechatPayV3Type
The 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> String |
doDownload(WechatRequestEntity<T> requestEntity)
下载文件返回的是字符串类型的.
|
private <T> void |
doExecute(WechatRequestEntity<T> requestEntity)
Do execute.
|
private <T> org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> |
doResource(WechatRequestEntity<T> requestEntity)
下载文件返回的是流类型的.
|
String |
download()
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)
构造私钥签名.
|
void |
request()
Request.
|
org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> |
resource()
Download string.
|
private final WechatPayV3Type wechatPayV3Type
private final org.springframework.web.client.RestOperations restOperations
private final SignatureProvider signatureProvider
private final M model
private java.util.function.BiFunction<WechatPayV3Type,M,org.springframework.http.RequestEntity<?>> requestEntityBiFunction
private java.util.function.Consumer<org.springframework.http.ResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>> responseBodyConsumer
Executor(WechatPayV3Type wechatPayV3Type, M model, SignatureProvider signatureProvider, org.springframework.web.client.RestOperations restOperations)
wechatPayV3Type - the v 3 pay typemodel - the modelsignatureProvider - the signature providerrestOperations - the rest operationspublic WechatPayClient.Executor<M> function(java.util.function.BiFunction<WechatPayV3Type,M,org.springframework.http.RequestEntity<?>> requestEntityBiFunction)
requestEntityBiFunction - the request entity bifunctionpublic WechatPayClient.Executor<M> consumer(java.util.function.Consumer<org.springframework.http.ResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>> responseBodyConsumer)
responseBodyConsumer - the response body consumerpublic void request()
public String download()
public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> resource()
private <T> WechatRequestEntity<T> header(boolean newLine, WechatRequestEntity<T> requestEntity)
T - the type parameterrequestEntity - the request entityprivate <T> void doExecute(WechatRequestEntity<T> requestEntity)
T - the type parameterrequestEntity - the request entityprivate <T> String doDownload(WechatRequestEntity<T> requestEntity)
T - the type parameterrequestEntity - the request entityprivate <T> org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> doResource(WechatRequestEntity<T> requestEntity)
T - the type parameterrequestEntity - the request entityCopyright © 2021. All rights reserved.