public interface

ApiResponse

implements java.io.Serializable

 com.bluenimble.platform.api.ApiResponse

Subclasses:

AbstractApiResponse, SimpleApiResponse

Summary

Fields
public static final ApiResponse.StatusACCEPTED

public static final ApiResponse.StatusBAD_GATEWAY

public static final ApiResponse.StatusBAD_REQUEST

Client Errors : 4xx

public static final ApiResponse.StatusCONFLICT

public static final ApiResponse.StatusCONTINUE

Informational : 1xx

public static final ApiResponse.StatusCREATED

public static final ApiResponse.StatusEXPECTATION_FAILED

public static final ApiResponse.StatusFAILED_DEPENDENCY

public static final ApiResponse.StatusFORBIDDEN

public static final ApiResponse.StatusGATEWAY_TIMEOUT

public static final ApiResponse.StatusGONE

public static final ApiResponse.StatusHTTP_VERSION_NOT_SUPPORTED

public static final ApiResponse.StatusINSUFFICIENT_SPACE_ON_RESOURCE

public static final ApiResponse.StatusINSUFFICIENT_STORAGE

public static final ApiResponse.StatusINTERNAL_SERVER_ERROR

Server Errors : 5xx

public static final ApiResponse.StatusLENGTH_REQUIRED

public static final ApiResponse.StatusLOCKED

public static final ApiResponse.StatusMETHOD_FAILURE

public static final ApiResponse.StatusMETHOD_NOT_ALLOWED

public static final ApiResponse.StatusMOVED_PERMANENTLY

public static final ApiResponse.StatusMOVED_TEMPORARILY

public static final ApiResponse.StatusMULTI_STATUS

public static final ApiResponse.StatusMULTIPLE_CHOICES

Redirection : 3xx

public static final ApiResponse.StatusNO_CONTENT

public static final ApiResponse.StatusNON_AUTHORITATIVE_INFORMATION

public static final ApiResponse.StatusNOT_ACCEPTABLE

public static final ApiResponse.StatusNOT_FOUND

public static final ApiResponse.StatusNOT_IMPLEMENTED

public static final ApiResponse.StatusNOT_MODIFIED

public static final ApiResponse.StatusOK

Success : 2xx

public static final ApiResponse.StatusPARTIAL_CONTENT

public static final ApiResponse.StatusPAYMENT_REQUIRED

public static final ApiResponse.StatusPRECONDITION_FAILED

public static final ApiResponse.StatusPROCESSING

public static final ApiResponse.StatusPROXY_AUTHENTICATION_REQUIRED

public static final ApiResponse.StatusREQUEST_TIMEOUT

public static final ApiResponse.StatusREQUEST_TOO_LONG

public static final ApiResponse.StatusREQUEST_URI_TOO_LONG

public static final ApiResponse.StatusREQUESTED_RANGE_NOT_SATISFIABLE

public static final java.lang.StringRequestID

public static final ApiResponse.StatusRESET_CONTENT

public static final ApiResponse.StatusSEE_OTHER

public static final ApiResponse.StatusSERVICE_UNAVAILABLE

public static final ApiResponse.StatusSWITCHING_PROTOCOLS

public static final ApiResponse.StatusTEMPORARY_REDIRECT

public static final ApiResponse.StatusUNAUTHORIZED

public static final ApiResponse.StatusUNPROCESSABLE_ENTITY

public static final ApiResponse.StatusUNSUPPORTED_MEDIA_TYPE

public static final ApiResponse.StatusUSE_PROXY

Methods
public voidclose()

public voidcommit()

public ApiResponseerror(ApiResponse.Status status, java.lang.Object message)

public voidflushHeaders()

public JsonObjectgetError()

public java.lang.StringgetId()

public ApiResponse.StatusgetStatus()

public booleanisCommitted()

public voidreset()

public ApiResponseset(java.lang.String name, java.lang.Object value)

public voidsetBuffer(int size)

public voidsetStatus(ApiResponse.Status status)

public java.io.OutputStreamtoOutput()

public java.io.WritertoWriter()

public ApiResponsewrite(byte[] buff[], int offset, int length)

public ApiResponsewrite(java.lang.Object buff)

Fields

public static final java.lang.String RequestID

public static final ApiResponse.Status CONTINUE

Informational : 1xx

public static final ApiResponse.Status SWITCHING_PROTOCOLS

public static final ApiResponse.Status PROCESSING

public static final ApiResponse.Status OK

Success : 2xx

public static final ApiResponse.Status CREATED

public static final ApiResponse.Status ACCEPTED

public static final ApiResponse.Status NON_AUTHORITATIVE_INFORMATION

public static final ApiResponse.Status NO_CONTENT

public static final ApiResponse.Status RESET_CONTENT

public static final ApiResponse.Status PARTIAL_CONTENT

public static final ApiResponse.Status MULTI_STATUS

public static final ApiResponse.Status MULTIPLE_CHOICES

Redirection : 3xx

public static final ApiResponse.Status MOVED_PERMANENTLY

public static final ApiResponse.Status MOVED_TEMPORARILY

public static final ApiResponse.Status SEE_OTHER

public static final ApiResponse.Status NOT_MODIFIED

public static final ApiResponse.Status USE_PROXY

public static final ApiResponse.Status TEMPORARY_REDIRECT

public static final ApiResponse.Status BAD_REQUEST

Client Errors : 4xx

public static final ApiResponse.Status UNAUTHORIZED

public static final ApiResponse.Status PAYMENT_REQUIRED

public static final ApiResponse.Status FORBIDDEN

public static final ApiResponse.Status NOT_FOUND

public static final ApiResponse.Status METHOD_NOT_ALLOWED

public static final ApiResponse.Status NOT_ACCEPTABLE

public static final ApiResponse.Status PROXY_AUTHENTICATION_REQUIRED

public static final ApiResponse.Status REQUEST_TIMEOUT

public static final ApiResponse.Status CONFLICT

public static final ApiResponse.Status GONE

public static final ApiResponse.Status LENGTH_REQUIRED

public static final ApiResponse.Status PRECONDITION_FAILED

public static final ApiResponse.Status REQUEST_TOO_LONG

public static final ApiResponse.Status REQUEST_URI_TOO_LONG

public static final ApiResponse.Status UNSUPPORTED_MEDIA_TYPE

public static final ApiResponse.Status REQUESTED_RANGE_NOT_SATISFIABLE

public static final ApiResponse.Status EXPECTATION_FAILED

public static final ApiResponse.Status INSUFFICIENT_SPACE_ON_RESOURCE

public static final ApiResponse.Status METHOD_FAILURE

public static final ApiResponse.Status UNPROCESSABLE_ENTITY

public static final ApiResponse.Status LOCKED

public static final ApiResponse.Status FAILED_DEPENDENCY

public static final ApiResponse.Status INTERNAL_SERVER_ERROR

Server Errors : 5xx

public static final ApiResponse.Status NOT_IMPLEMENTED

public static final ApiResponse.Status BAD_GATEWAY

public static final ApiResponse.Status SERVICE_UNAVAILABLE

public static final ApiResponse.Status GATEWAY_TIMEOUT

public static final ApiResponse.Status HTTP_VERSION_NOT_SUPPORTED

public static final ApiResponse.Status INSUFFICIENT_STORAGE

Methods

public java.lang.String getId()

public ApiResponse set(java.lang.String name, java.lang.Object value)

public void setStatus(ApiResponse.Status status)

public ApiResponse.Status getStatus()

public void setBuffer(int size)

public java.io.OutputStream toOutput()

public java.io.Writer toWriter()

public ApiResponse write(byte[] buff[], int offset, int length)

public ApiResponse write(java.lang.Object buff)

public ApiResponse error(ApiResponse.Status status, java.lang.Object message)

public JsonObject getError()

public void reset()

public void close()

public void commit()

public boolean isCommitted()

public void flushHeaders()