Package com.inductiveautomation.snap.web
Class Response
java.lang.Object
com.inductiveautomation.snap.web.Response
The response.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getBytes()
Returns the bytes.protected byte[]
Returns the bytes.int
getCode()
Returns the response code.Returns the code message.Returns the response type.protected DataType
Returns a data type for this response based on the file.Returns the exception.getFile()
Returns the file.getFiles()
Returns the files (for directory request).Returns the request.Returns the request URL.getSite()
Returns the site for the request/response.getText()
Returns the text of the response.protected String
Returns the text.long
getTime()
Returns the response time.void
setBytes
(byte[] theBytes) Sets the response bytes.void
setCode
(int aCode) Sets the response code.protected void
setDataType
(DataType aType) Sets the data type.void
setException
(Throwable aThrowable) Sets the exception.void
Sets the file.void
Sets the files (for directory request).void
setRequest
(Request aRequest) Sets the request.void
Sets the text.toString()
Standard toString implementation.
-
Field Details
-
OK
public static final int OK- See Also:
-
UNAUTHROIZED
public static final int UNAUTHROIZED- See Also:
-
NOT_FOUND
public static final int NOT_FOUND- See Also:
-
METHOD_NOT_ALLOWED
public static final int METHOD_NOT_ALLOWED- See Also:
-
EXCEPTION_THROWN
public static final int EXCEPTION_THROWN- See Also:
-
-
Constructor Details
-
Response
public Response()
-
-
Method Details
-
getRequest
Returns the request. -
setRequest
Sets the request. -
getRequestURL
Returns the request URL. -
getSite
Returns the site for the request/response. -
getCode
public int getCode()Returns the response code. -
setCode
public void setCode(int aCode) Sets the response code. -
getCodeString
Returns the code message. -
getTime
public long getTime()Returns the response time. -
getDataType
Returns the response type. -
getDataTypeImpl
Returns a data type for this response based on the file. -
setDataType
Sets the data type. -
getFile
Returns the file. -
setFile
Sets the file. -
getFiles
Returns the files (for directory request). -
setFiles
Sets the files (for directory request). -
getBytes
public byte[] getBytes()Returns the bytes. -
getBytesImpl
protected byte[] getBytesImpl()Returns the bytes. -
setBytes
public void setBytes(byte[] theBytes) Sets the response bytes. -
getText
Returns the text of the response. -
getTextImpl
Returns the text. -
setText
Sets the text. -
getException
Returns the exception. -
setException
Sets the exception. -
toString
Standard toString implementation.
-