public class AlipayMobilePublicMultiMediaClient extends Object implements AlipayClient
Constructor and Description |
---|
AlipayMobilePublicMultiMediaClient(String serverUrl,
String appId,
String privateKey)
Instantiates a new Alipay mobile public multi media client.
|
AlipayMobilePublicMultiMediaClient(String serverUrl,
String appId,
String privateKey,
String format)
Instantiates a new Alipay mobile public multi media client.
|
AlipayMobilePublicMultiMediaClient(String serverUrl,
String appId,
String privateKey,
String format,
String charset)
Instantiates a new Alipay mobile public multi media client.
|
AlipayMobilePublicMultiMediaClient(String serverUrl,
String appId,
String privateKey,
String format,
String charset,
String signType)
Instantiates a new Alipay mobile public multi media client.
|
Modifier and Type | Method and Description |
---|---|
static String |
buildQuery(Map<String,String> params,
String charset)
Build query string.
|
<T extends AlipayResponse> |
doGet(AlipayRequest<T> request,
String appAuthToken)
Do get t.
|
static AlipayMobilePublicMultiMediaDownloadResponse |
doGet(String url,
RequestParametersHolder requestHolder,
String charset,
int connectTimeout,
int readTimeout,
OutputStream output)
Do get alipay mobile public multi media download response.
|
<T extends AlipayResponse> |
execute(AlipayRequest<T> request)
Execute t.
|
<T extends AlipayResponse> |
execute(AlipayRequest<T> request,
String accessToken)
Execute t.
|
<T extends AlipayResponse> |
execute(AlipayRequest<T> request,
String accessToken,
String appAuthToken)
Execute t.
|
protected static String |
getResponseAsString(HttpURLConnection conn)
Gets response as string.
|
<T extends AlipayResponse> |
pageExecute(AlipayRequest<T> request)
Page execute t.
|
<T extends AlipayResponse> |
pageExecute(AlipayRequest<T> request,
String method)
Page execute t.
|
<TR extends AlipayResponse,T extends AlipayRequest<TR>> |
parseAppSyncResult(Map<String,String> result,
Class<T> requsetClazz)
移动客户端同步结果返回解析的参考工具方法
|
<T extends AlipayResponse> |
sdkExecute(AlipayRequest<T> request)
SDK客户端调用生成sdk字符串
|
static Map<String,String> |
splitUrlQuery(String query)
Split url query map.
|
public AlipayMobilePublicMultiMediaClient(String serverUrl, String appId, String privateKey)
serverUrl
- the server urlappId
- the app idprivateKey
- the private keypublic AlipayMobilePublicMultiMediaClient(String serverUrl, String appId, String privateKey, String format)
serverUrl
- the server urlappId
- the app idprivateKey
- the private keyformat
- the formatpublic AlipayMobilePublicMultiMediaClient(String serverUrl, String appId, String privateKey, String format, String charset)
serverUrl
- the server urlappId
- the app idprivateKey
- the private keyformat
- the formatcharset
- the charsetpublic AlipayMobilePublicMultiMediaClient(String serverUrl, String appId, String privateKey, String format, String charset, String signType)
serverUrl
- the server urlappId
- the app idprivateKey
- the private keyformat
- the formatcharset
- the charsetsignType
- the sign typepublic <T extends AlipayResponse> T execute(AlipayRequest<T> request) throws AlipayApiException
AlipayClient
execute
in interface AlipayClient
T
- the type parameterrequest
- the requestAlipayApiException
- the alipay api exceptionAlipayClient.execute(com.alipay.api.AlipayRequest)
public <T extends AlipayResponse> T execute(AlipayRequest<T> request, String accessToken) throws AlipayApiException
AlipayClient
execute
in interface AlipayClient
T
- the type parameterrequest
- the requestaccessToken
- the auth tokenAlipayApiException
- the alipay api exceptionAlipayClient.execute(com.alipay.api.AlipayRequest, java.lang.String)
public <T extends AlipayResponse> T execute(AlipayRequest<T> request, String accessToken, String appAuthToken) throws AlipayApiException
AlipayClient
execute
in interface AlipayClient
T
- the type parameterrequest
- the requestaccessToken
- the access tokenappAuthToken
- the app auth tokenAlipayApiException
- the alipay api exceptionAlipayClient.execute(com.alipay.api.AlipayRequest, java.lang.String, java.lang.String)
public <T extends AlipayResponse> T doGet(AlipayRequest<T> request, String appAuthToken) throws AlipayApiException
T
- the type parameterrequest
- the requestappAuthToken
- the app auth tokenAlipayApiException
- the alipay api exceptionpublic static AlipayMobilePublicMultiMediaDownloadResponse doGet(String url, RequestParametersHolder requestHolder, String charset, int connectTimeout, int readTimeout, OutputStream output) throws AlipayApiException, IOException
url
- the urlrequestHolder
- the request holdercharset
- the charsetconnectTimeout
- the connect timeoutreadTimeout
- the read timeoutoutput
- the outputAlipayApiException
- the alipay api exceptionIOException
- the io exceptionprotected static String getResponseAsString(HttpURLConnection conn) throws IOException
conn
- the connIOException
- the io exceptionpublic static String buildQuery(Map<String,String> params, String charset) throws IOException
params
- the paramscharset
- the charsetIOException
- the io exceptionpublic static Map<String,String> splitUrlQuery(String query)
query
- the querypublic <T extends AlipayResponse> T pageExecute(AlipayRequest<T> request) throws AlipayApiException
AlipayClient
pageExecute
in interface AlipayClient
T
- the type parameterrequest
- the requestAlipayApiException
- the alipay api exceptionpublic <T extends AlipayResponse> T pageExecute(AlipayRequest<T> request, String method) throws AlipayApiException
AlipayClient
pageExecute
in interface AlipayClient
T
- the type parameterrequest
- the requestmethod
- the methodAlipayApiException
- the alipay api exceptionpublic <TR extends AlipayResponse,T extends AlipayRequest<TR>> TR parseAppSyncResult(Map<String,String> result, Class<T> requsetClazz) throws AlipayApiException
AlipayClient
parseAppSyncResult
in interface AlipayClient
TR
- the type parameterT
- the type parameterresult
- 移动客户端SDK同步返回的结果map,一般包含resultStatus,result和memo三个keyrequsetClazz
- 接口请求request类,如App支付传入 AlipayTradeAppPayRequest.classAlipayApiException
- the alipay api exceptionpublic <T extends AlipayResponse> T sdkExecute(AlipayRequest<T> request) throws AlipayApiException
AlipayClient
sdkExecute
in interface AlipayClient
T
- the type parameterrequest
- the requestAlipayApiException
- the alipay api exceptionCopyright © 2018. All rights reserved.