Java Code Examples for cn.jiguang.common.resp.ResponseWrapper#isServerResponse()

The following examples show how to use cn.jiguang.common.resp.ResponseWrapper#isServerResponse() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GroupStatListResult.java    From jmessage-api-java-client with MIT License 5 votes vote down vote up
public static GroupStatListResult fromResponse(ResponseWrapper responseWrapper) {
    GroupStatListResult result = new GroupStatListResult();
    if (responseWrapper.isServerResponse()) {
        result.array = _gson.fromJson(responseWrapper.responseContent, GroupStatResult[].class);
    }
    result.setResponseWrapper(responseWrapper);
    return result;
}
 
Example 2
Source File: UserStatListResult.java    From jmessage-api-java-client with MIT License 5 votes vote down vote up
public static UserStatListResult fromResponse(ResponseWrapper responseWrapper) {
    UserStatListResult result = new UserStatListResult();
    if (responseWrapper.isServerResponse()) {
        result.array = _gson.fromJson(responseWrapper.responseContent, UserStatResult[].class);
    }
    result.setResponseWrapper(responseWrapper);
    return result;
}
 
Example 3
Source File: MessageListResult.java    From jmessage-api-java-client with MIT License 5 votes vote down vote up
public static MessageListResult fromResponse(ResponseWrapper responseWrapper) {
    MessageListResult result = new MessageListResult();
    if (responseWrapper.isServerResponse()) {
        result.messages = _gson.fromJson(responseWrapper.responseContent, MessageResult[].class);
    }
    result.setResponseWrapper(responseWrapper);
    return result;
}
 
Example 4
Source File: MemberListResult.java    From jmessage-api-java-client with MIT License 5 votes vote down vote up
public static MemberListResult fromResponse(ResponseWrapper responseWrapper) {
    MemberListResult  result = new MemberListResult();
    if (responseWrapper.isServerResponse()) {
        result.members = _gson.fromJson(responseWrapper.responseContent, MemberResult[].class);
    } else {
        // nothing
    }
    result.setResponseWrapper(responseWrapper);
    return result;
}
 
Example 5
Source File: ChatRoomListResult.java    From jmessage-api-java-client with MIT License 5 votes vote down vote up
public static ChatRoomListResult fromResponse(ResponseWrapper responseWrapper) {
    ChatRoomListResult result = new ChatRoomListResult();
    if (responseWrapper.isServerResponse()) {
        result.roomsArray = _gson.fromJson(responseWrapper.responseContent, ChatRoomResult[].class);
    }
    result.setResponseWrapper(responseWrapper);
    return result;
}
 
Example 6
Source File: ChatRoomMemberList.java    From jmessage-api-java-client with MIT License 5 votes vote down vote up
public static ChatRoomMemberList fromResponse(ResponseWrapper responseWrapper) {
    ChatRoomMemberList  result = new ChatRoomMemberList();
    if (responseWrapper.isServerResponse()) {
        result.users = _gson.fromJson(responseWrapper.responseContent, ChatRoomMember[].class);
    } else {
        // nothing
    }
    result.setResponseWrapper(responseWrapper);
    return result;
}
 
Example 7
Source File: UserListResult.java    From jmessage-api-java-client with MIT License 5 votes vote down vote up
public static UserListResult fromResponse(ResponseWrapper responseWrapper) {
    UserListResult result = new UserListResult();
    if (responseWrapper.isServerResponse()) {
        result.users = _gson.fromJson(responseWrapper.responseContent, UserInfoResult[].class);
    }
    result.setResponseWrapper(responseWrapper);
    return result;
}
 
Example 8
Source File: UserGroupsResult.java    From jmessage-api-java-client with MIT License 5 votes vote down vote up
public static UserGroupsResult fromResponse(ResponseWrapper responseWrapper) {
    UserGroupsResult  result = new UserGroupsResult();
    if (responseWrapper.isServerResponse()) {
        result.groups = _gson.fromJson(responseWrapper.responseContent, GroupInfoResult[].class);
    } else {
        // nothing
    }
    result.setResponseWrapper(responseWrapper);
    return result;
}