com.tencent.mm.sdk.modelbase
Class BaseResp

java.lang.Object
  extended by com.tencent.mm.sdk.modelbase.BaseResp
Direct Known Subclasses:
GetMessageFromWX.Resp, LaunchFromWX.Resp, PayResp, SendAuth.Resp, SendMessageToWX.Resp, ShowMessageFromWX.Resp

public abstract class BaseResp
extends java.lang.Object

Base class of OpenAPI responses
OpenAPI响应基类


Nested Class Summary
static interface BaseResp.ErrCode
          
Error code for OpenAPI responses
OpenAPI响应错误代码
 
Field Summary
 int errCode
          
Error code.
 java.lang.String errStr
          
Invalid texts
错误文本
 java.lang.String openId
           
 java.lang.String transaction
          
Transaction ID corresponding to this request.
 
Constructor Summary
BaseResp()
           
 
Method Summary
abstract  boolean checkArgs()
          
Check parameters of this response
检查该响应各个参数的合法性
 void fromBundle(Bundle data)
          
Deserialize response data in Bundle
从Bundle中反序列化响应数据
abstract  int getType()
          
Return type ID of the current response.
 void toBundle(Bundle data)
          
Serialize responses in Bundle
将响应序列化到Bundle中
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errCode

public int errCode
Error code. See BaseResp.ErrCode
错误码, 参考 BaseResp.ErrCode


errStr

public java.lang.String errStr
Invalid texts
错误文本


transaction

public java.lang.String transaction
Transaction ID corresponding to this request. It is usually created by Req. Corresponding transaction ID should be populated in Resp.
对应请求的事务ID,通常由Req创建,回复Resp时应填入对应事务ID


openId

public java.lang.String openId
Constructor Detail

BaseResp

public BaseResp()
Method Detail

getType

public abstract int getType()
Return type ID of the current response. See ConstantsAPI
返回当前响应的类型ID,参考 ConstantsAPI

Returns:
type of current request instance

toBundle

public void toBundle(Bundle data)
Serialize responses in Bundle
将响应序列化到Bundle中

Parameters:
data -
Bundle that used to carry response data
承载响应数据的Bundle

fromBundle

public void fromBundle(Bundle data)
Deserialize response data in Bundle
从Bundle中反序列化响应数据

Parameters:
data -
Bundle that used to carry response data
承载响应数据的Bundle

checkArgs

public abstract boolean checkArgs()
Check parameters of this response
检查该响应各个参数的合法性

Returns:
Returns True if all parameters are valid.
如果参数均合法,返回true