Back to project page android-rest-client.
The source code is released under:
Apache License
If you think the Android project android-rest-client listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.dg.libs.rest.domain; /*from ww w .ja v a 2s.c o m*/ import org.apache.http.HttpStatus; public class ResponseStatus { public static final String TAG = ResponseStatus.class.getSimpleName(); private int statusCode; private String statusMessage; public ResponseStatus(int statusCode, String statusMessage) { this.statusCode = statusCode; this.statusMessage = statusMessage; } public ResponseStatus() { } public int getStatusCode() { return statusCode; } public void setStatusCode(int statusCode) { this.statusCode = statusCode; } public String getStatusMessage() { return statusMessage; } public void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } public static ResponseStatus getConnectionErrorStatus() { ResponseStatus status = new ResponseStatus(); status.setStatusCode(HttpStatus.SC_REQUEST_TIMEOUT); status.setStatusMessage("HTTP Connection Error"); return status; } public static ResponseStatus getParseErrorStatus() { ResponseStatus status = new ResponseStatus(); status.setStatusCode(HttpStatus.SC_BAD_REQUEST); status.setStatusMessage("Parser Error"); return status; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("ResponseStatus [statusCode="); builder.append(statusCode); builder.append(", statusMessage="); builder.append(statusMessage); builder.append("]"); return builder.toString(); } }