11package me .chanjar .weixin .mp .config ;
22
33import me .chanjar .weixin .common .bean .WxAccessToken ;
4+ import me .chanjar .weixin .common .enums .TicketType ;
45import me .chanjar .weixin .common .util .http .apache .ApacheHttpClientBuilder ;
56import me .chanjar .weixin .mp .bean .WxMpHostConfig ;
6- import me .chanjar .weixin .common .enums .TicketType ;
77
88import java .io .File ;
99import java .util .concurrent .locks .Lock ;
1414 * @author chanjarster
1515 */
1616public interface WxMpConfigStorage {
17+ /**
18+ * Gets access token.
19+ *
20+ * @return the access token
21+ */
1722 String getAccessToken ();
1823
24+ /**
25+ * Gets access token lock.
26+ *
27+ * @return the access token lock
28+ */
1929 Lock getAccessTokenLock ();
2030
31+ /**
32+ * Is access token expired boolean.
33+ *
34+ * @return the boolean
35+ */
2136 boolean isAccessTokenExpired ();
2237
2338 /**
@@ -40,14 +55,34 @@ public interface WxMpConfigStorage {
4055 */
4156 void updateAccessToken (String accessToken , int expiresInSeconds );
4257
58+ /**
59+ * Gets ticket.
60+ *
61+ * @param type the type
62+ * @return the ticket
63+ */
4364 String getTicket (TicketType type );
4465
66+ /**
67+ * Gets ticket lock.
68+ *
69+ * @param type the type
70+ * @return the ticket lock
71+ */
4572 Lock getTicketLock (TicketType type );
4673
74+ /**
75+ * Is ticket expired boolean.
76+ *
77+ * @param type the type
78+ * @return the boolean
79+ */
4780 boolean isTicketExpired (TicketType type );
4881
4982 /**
5083 * 强制将ticket过期掉.
84+ *
85+ * @param type the type
5186 */
5287 void expireTicket (TicketType type );
5388
@@ -61,44 +96,115 @@ public interface WxMpConfigStorage {
6196 */
6297 void updateTicket (TicketType type , String ticket , int expiresInSeconds );
6398
99+ /**
100+ * Gets app id.
101+ *
102+ * @return the app id
103+ */
64104 String getAppId ();
65105
106+ /**
107+ * Gets secret.
108+ *
109+ * @return the secret
110+ */
66111 String getSecret ();
67112
113+ /**
114+ * Gets token.
115+ *
116+ * @return the token
117+ */
68118 String getToken ();
69119
120+ /**
121+ * Gets aes key.
122+ *
123+ * @return the aes key
124+ */
70125 String getAesKey ();
71126
127+ /**
128+ * Gets template id.
129+ *
130+ * @return the template id
131+ */
72132 String getTemplateId ();
73133
134+ /**
135+ * Gets expires time.
136+ *
137+ * @return the expires time
138+ */
74139 long getExpiresTime ();
75140
141+ /**
142+ * Gets oauth 2 redirect uri.
143+ *
144+ * @return the oauth 2 redirect uri
145+ */
76146 String getOauth2redirectUri ();
77147
148+ /**
149+ * Gets http proxy host.
150+ *
151+ * @return the http proxy host
152+ */
78153 String getHttpProxyHost ();
79154
155+ /**
156+ * Gets http proxy port.
157+ *
158+ * @return the http proxy port
159+ */
80160 int getHttpProxyPort ();
81161
162+ /**
163+ * Gets http proxy username.
164+ *
165+ * @return the http proxy username
166+ */
82167 String getHttpProxyUsername ();
83168
169+ /**
170+ * Gets http proxy password.
171+ *
172+ * @return the http proxy password
173+ */
84174 String getHttpProxyPassword ();
85175
176+ /**
177+ * Gets tmp dir file.
178+ *
179+ * @return the tmp dir file
180+ */
86181 File getTmpDirFile ();
87182
88183 /**
89184 * http client builder.
90185 *
91- * @return ApacheHttpClientBuilder
186+ * @return ApacheHttpClientBuilder apache http client builder
92187 */
93188 ApacheHttpClientBuilder getApacheHttpClientBuilder ();
94189
95190 /**
96191 * 是否自动刷新token.
192+ *
193+ * @return the boolean
97194 */
98195 boolean autoRefreshToken ();
99196
100197 /**
101198 * 得到微信接口地址域名部分的自定义设置信息.
199+ *
200+ * @return the host config
102201 */
103202 WxMpHostConfig getHostConfig ();
203+
204+ /**
205+ * 设置微信接口地址域名部分的自定义设置信息.
206+ *
207+ * @param hostConfig host config
208+ */
209+ void setHostConfig (WxMpHostConfig hostConfig );
104210}
0 commit comments