类 WechatPayClient.Executor<M>

  • 类型参数:
    M - the type parameter
    封闭类:
    WechatPayClient

    public static class WechatPayClient.Executor<M>
    extends Object
    The type Executor.
    作者:
    felord.cn
    • 字段详细资料

      • 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 type
        model - the model
        signatureProvider - the signature provider
        restOperations - 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