me.chanjar.weixin.mp.api

## 类 WxMpInMemoryConfigStorage

- java.lang.Object
- - me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage

所有已实现的接口:
  WxMpConfigStorage

    public class WxMpInMemoryConfigStorage
    extends Object
    implements WxMpConfigStorage

基于内存的微信配置provider，在实际生产环境中应该将这些配置持久化

作者:
  chanjarster

### 字段概要

字段
`protected String` `accessToken`
`protected Lock` `accessTokenLock`
`protected String` `aesKey`
`protected ApacheHttpClientBuilder` `apacheHttpClientBuilder`
`protected String` `appId`
`protected String` `cardApiTicket`
`protected long` `cardApiTicketExpiresTime`
`protected Lock` `cardApiTicketLock`
`protected long` `expiresTime`
`protected String` `httpProxyHost`
`protected String` `httpProxyPassword`
`protected int` `httpProxyPort`
`protected String` `httpProxyUsername`
`protected String` `jsapiTicket`
`protected long` `jsapiTicketExpiresTime`
`protected Lock` `jsapiTicketLock`
`protected String` `notifyURL`
`protected String` `oauth2redirectUri`
`protected String` `partnerId`
`protected String` `partnerKey`
`protected String` `secret`
`protected SSLContext` `sslContext`
`protected File` `tmpDirFile` 临时文件目录
`protected String` `token`
`protected String` `tradeType`

### 构造器概要

构造器
构造器和说明
`WxMpInMemoryConfigStorage()`

### 方法概要

方法
`boolean` `autoRefreshToken()` 是否自动刷新token
`void` `expireAccessToken()` 强制将access token过期掉
`void` `expireCardApiTicket()` 强制将卡券api ticket过期掉
`void` `expireJsapiTicket()` 强制将jsapi ticket过期掉
`String` `getAccessToken()`
`Lock` `getAccessTokenLock()`
`String` `getAesKey()`
`ApacheHttpClientBuilder` `getApacheHttpClientBuilder()` http client builder
`String` `getAppId()`
`String` `getCardApiTicket()` 卡券api_ticket
`Lock` `getCardApiTicketLock()`
`long` `getExpiresTime()`
`String` `getHttpProxyHost()`
`String` `getHttpProxyPassword()`
`int` `getHttpProxyPort()`
`String` `getHttpProxyUsername()`
`String` `getJsapiTicket()`
`long` `getJsapiTicketExpiresTime()`
`Lock` `getJsapiTicketLock()`
`String` `getNotifyURL()` 微信支付异步回掉地址，通知url必须为直接可访问的url，不能携带参数。
`String` `getOauth2redirectUri()`
`String` `getPartnerId()`
`String` `getPartnerKey()`
`String` `getSecret()`
`SSLContext` `getSSLContext()`
`File` `getTmpDirFile()`
`String` `getToken()`
`String` `getTradeType()` 交易类型 JSAPI--公众号支付、NATIVE--原生扫码支付、APP--app支付
`boolean` `isAccessTokenExpired()`
`boolean` `isCardApiTicketExpired()`
`boolean` `isJsapiTicketExpired()`
`void` `setAccessToken(String accessToken)`
`void` `setAesKey(String aesKey)`
`void` `setApacheHttpClientBuilder(ApacheHttpClientBuilder apacheHttpClientBuilder)`
`void` `setAppId(String appId)`
`void` `setExpiresTime(long expiresTime)`
`void` `setHttpProxyHost(String httpProxyHost)`
`void` `setHttpProxyPassword(String httpProxyPassword)`
`void` `setHttpProxyPort(int httpProxyPort)`
`void` `setHttpProxyUsername(String httpProxyUsername)`
`void` `setJsapiTicket(String jsapiTicket)`
`void` `setJsapiTicketExpiresTime(long jsapiTicketExpiresTime)`
`void` `setNotifyURL(String notifyURL)`
`void` `setOauth2redirectUri(String oauth2redirectUri)`
`void` `setPartnerId(String partnerId)`
`void` `setPartnerKey(String partnerKey)`
`void` `setSecret(String secret)`
`void` `setSSLContext(SSLContext context)`
`void` `setTmpDirFile(File tmpDirFile)`
`void` `setToken(String token)`
`void` `setTradeType(String tradeType)`
`String` `toString()`
`void` `updateAccessToken(String accessToken, int expiresInSeconds)` 应该是线程安全的
`void` `updateAccessToken(WxAccessToken accessToken)` 应该是线程安全的
`void` `updateCardApiTicket(String cardApiTicket, int expiresInSeconds)` 应该是线程安全的
`void` `updateJsapiTicket(String jsapiTicket, int expiresInSeconds)` 应该是线程安全的

### 从类继承的方法 java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### 字段详细资料

#### appId

    protected volatile String appId

#### secret

    protected volatile String secret

#### partnerId

    protected volatile String partnerId

#### partnerKey

    protected volatile String partnerKey

#### notifyURL

    protected volatile String notifyURL

#### tradeType

    protected volatile String tradeType

#### token

    protected volatile String token

#### accessToken

    protected volatile String accessToken

#### aesKey

    protected volatile String aesKey

#### expiresTime

    protected volatile long expiresTime

#### oauth2redirectUri

    protected volatile String oauth2redirectUri

#### httpProxyHost

    protected volatile String httpProxyHost

#### httpProxyPort

    protected volatile int httpProxyPort

#### httpProxyUsername

    protected volatile String httpProxyUsername

#### httpProxyPassword

    protected volatile String httpProxyPassword

#### jsapiTicket

    protected volatile String jsapiTicket

#### jsapiTicketExpiresTime

    protected volatile long jsapiTicketExpiresTime

#### cardApiTicket

    protected volatile String cardApiTicket

#### cardApiTicketExpiresTime

    protected volatile long cardApiTicketExpiresTime

#### accessTokenLock

    protected Lock accessTokenLock

#### jsapiTicketLock

    protected Lock jsapiTicketLock

#### cardApiTicketLock

    protected Lock cardApiTicketLock

#### tmpDirFile

    protected volatile File tmpDirFile

临时文件目录

#### sslContext

    protected volatile SSLContext sslContext

#### apacheHttpClientBuilder

    protected volatile ApacheHttpClientBuilder apacheHttpClientBuilder

### 构造器详细资料

#### WxMpInMemoryConfigStorage

    public WxMpInMemoryConfigStorage()

### 方法详细资料

#### getAccessToken

    public String getAccessToken()

指定者:
  `getAccessToken` 在接口中 `WxMpConfigStorage`

#### getAccessTokenLock

    public Lock getAccessTokenLock()

指定者:
  `getAccessTokenLock` 在接口中 `WxMpConfigStorage`

#### isAccessTokenExpired

    public boolean isAccessTokenExpired()

指定者:
  `isAccessTokenExpired` 在接口中 `WxMpConfigStorage`

#### updateAccessToken

    public void updateAccessToken(WxAccessToken accessToken)

从接口复制的说明: `WxMpConfigStorage`
应该是线程安全的

指定者:
  `updateAccessToken` 在接口中 `WxMpConfigStorage`
参数:
  `accessToken` - 要更新的WxAccessToken对象

#### updateAccessToken

    public void updateAccessToken(String accessToken,
                         int expiresInSeconds)

从接口复制的说明: `WxMpConfigStorage`
应该是线程安全的

指定者:
  `updateAccessToken` 在接口中 `WxMpConfigStorage`
参数:
  `accessToken` - 新的accessToken值
  `expiresInSeconds` - 过期时间，以秒为单位

#### expireAccessToken

    public void expireAccessToken()

从接口复制的说明: `WxMpConfigStorage`
强制将access token过期掉

指定者:
  `expireAccessToken` 在接口中 `WxMpConfigStorage`

#### getJsapiTicket

    public String getJsapiTicket()

指定者:
  `getJsapiTicket` 在接口中 `WxMpConfigStorage`

#### getJsapiTicketLock

    public Lock getJsapiTicketLock()

指定者:
  `getJsapiTicketLock` 在接口中 `WxMpConfigStorage`

#### setJsapiTicket

    public void setJsapiTicket(String jsapiTicket)

#### getJsapiTicketExpiresTime

    public long getJsapiTicketExpiresTime()

#### setJsapiTicketExpiresTime

    public void setJsapiTicketExpiresTime(long jsapiTicketExpiresTime)

#### isJsapiTicketExpired

    public boolean isJsapiTicketExpired()

指定者:
  `isJsapiTicketExpired` 在接口中 `WxMpConfigStorage`

#### updateJsapiTicket

    public void updateJsapiTicket(String jsapiTicket,
                         int expiresInSeconds)

从接口复制的说明: `WxMpConfigStorage`
应该是线程安全的

指定者:
  `updateJsapiTicket` 在接口中 `WxMpConfigStorage`
参数:
  `jsapiTicket` - 新的jsapi ticket值
  `expiresInSeconds` - 过期时间，以秒为单位

#### expireJsapiTicket

    public void expireJsapiTicket()

从接口复制的说明: `WxMpConfigStorage`
强制将jsapi ticket过期掉

指定者:
  `expireJsapiTicket` 在接口中 `WxMpConfigStorage`

#### getCardApiTicket

    public String getCardApiTicket()

卡券api_ticket

指定者:
  `getCardApiTicket` 在接口中 `WxMpConfigStorage`

#### getCardApiTicketLock

    public Lock getCardApiTicketLock()

指定者:
  `getCardApiTicketLock` 在接口中 `WxMpConfigStorage`

#### isCardApiTicketExpired

    public boolean isCardApiTicketExpired()

指定者:
  `isCardApiTicketExpired` 在接口中 `WxMpConfigStorage`

#### updateCardApiTicket

    public void updateCardApiTicket(String cardApiTicket,
                           int expiresInSeconds)

从接口复制的说明: `WxMpConfigStorage`
应该是线程安全的

指定者:
  `updateCardApiTicket` 在接口中 `WxMpConfigStorage`
参数:
  `cardApiTicket` - 新的cardApi ticket值
  `expiresInSeconds` - 过期时间，以秒为单位

#### expireCardApiTicket

    public void expireCardApiTicket()

从接口复制的说明: `WxMpConfigStorage`
强制将卡券api ticket过期掉

指定者:
  `expireCardApiTicket` 在接口中 `WxMpConfigStorage`

#### getAppId

    public String getAppId()

指定者:
  `getAppId` 在接口中 `WxMpConfigStorage`

#### getSecret

    public String getSecret()

指定者:
  `getSecret` 在接口中 `WxMpConfigStorage`

#### getToken

    public String getToken()

指定者:
  `getToken` 在接口中 `WxMpConfigStorage`

#### getExpiresTime

    public long getExpiresTime()

指定者:
  `getExpiresTime` 在接口中 `WxMpConfigStorage`

#### setAppId

    public void setAppId(String appId)

#### setSecret

    public void setSecret(String secret)

#### setToken

    public void setToken(String token)

#### getAesKey

    public String getAesKey()

指定者:
  `getAesKey` 在接口中 `WxMpConfigStorage`

#### setAesKey

    public void setAesKey(String aesKey)

#### setAccessToken

    public void setAccessToken(String accessToken)

#### setExpiresTime

    public void setExpiresTime(long expiresTime)

#### getOauth2redirectUri

    public String getOauth2redirectUri()

指定者:
  `getOauth2redirectUri` 在接口中 `WxMpConfigStorage`

#### setOauth2redirectUri

    public void setOauth2redirectUri(String oauth2redirectUri)

#### getHttpProxyHost

    public String getHttpProxyHost()

指定者:
  `getHttpProxyHost` 在接口中 `WxMpConfigStorage`

#### setHttpProxyHost

    public void setHttpProxyHost(String httpProxyHost)

#### getHttpProxyPort

    public int getHttpProxyPort()

指定者:
  `getHttpProxyPort` 在接口中 `WxMpConfigStorage`

#### setHttpProxyPort

    public void setHttpProxyPort(int httpProxyPort)

#### getHttpProxyUsername

    public String getHttpProxyUsername()

指定者:
  `getHttpProxyUsername` 在接口中 `WxMpConfigStorage`

#### setHttpProxyUsername

    public void setHttpProxyUsername(String httpProxyUsername)

#### getHttpProxyPassword

    public String getHttpProxyPassword()

指定者:
  `getHttpProxyPassword` 在接口中 `WxMpConfigStorage`

#### setHttpProxyPassword

    public void setHttpProxyPassword(String httpProxyPassword)

#### toString

    public String toString()

覆盖:
  `toString` 在类中 `Object`

#### getPartnerId

    public String getPartnerId()

指定者:
  `getPartnerId` 在接口中 `WxMpConfigStorage`

#### setPartnerId

    public void setPartnerId(String partnerId)

#### getPartnerKey

    public String getPartnerKey()

指定者:
  `getPartnerKey` 在接口中 `WxMpConfigStorage`

#### setPartnerKey

    public void setPartnerKey(String partnerKey)

#### getNotifyURL

    public String getNotifyURL()

从接口复制的说明: `WxMpConfigStorage`
微信支付异步回掉地址，通知url必须为直接可访问的url，不能携带参数。

指定者:
  `getNotifyURL` 在接口中 `WxMpConfigStorage`
返回:

#### setNotifyURL

    public void setNotifyURL(String notifyURL)

#### getTradeType

    public String getTradeType()

从接口复制的说明: `WxMpConfigStorage`
交易类型

     JSAPI--公众号支付、NATIVE--原生扫码支付、APP--app支付

指定者:
  `getTradeType` 在接口中 `WxMpConfigStorage`
返回:

#### setTradeType

    public void setTradeType(String tradeType)

#### getTmpDirFile

    public File getTmpDirFile()

指定者:
  `getTmpDirFile` 在接口中 `WxMpConfigStorage`

#### setTmpDirFile

    public void setTmpDirFile(File tmpDirFile)

#### getSSLContext

    public SSLContext getSSLContext()

指定者:
  `getSSLContext` 在接口中 `WxMpConfigStorage`

#### setSSLContext

    public void setSSLContext(SSLContext context)

#### getApacheHttpClientBuilder

    public ApacheHttpClientBuilder getApacheHttpClientBuilder()

从接口复制的说明: `WxMpConfigStorage`
http client builder

指定者:
  `getApacheHttpClientBuilder` 在接口中 `WxMpConfigStorage`
返回:
  ApacheHttpClientBuilder

#### autoRefreshToken

    public boolean autoRefreshToken()

从接口复制的说明: `WxMpConfigStorage`
是否自动刷新token

指定者:
  `autoRefreshToken` 在接口中 `WxMpConfigStorage`

#### setApacheHttpClientBuilder

    public void setApacheHttpClientBuilder(ApacheHttpClientBuilder apacheHttpClientBuilder)