Package com.inductiveautomation.snap.web
Class Response
- java.lang.Object
- 
- com.inductiveautomation.snap.web.Response
 
- 
 public class Response extends java.lang.ObjectThe response.
- 
- 
Field SummaryFields Modifier and Type Field Description static intEXCEPTION_THROWNstatic intMETHOD_NOT_ALLOWEDstatic intNOT_FOUNDstatic intOKstatic intUNAUTHROIZED
 - 
Constructor SummaryConstructors Constructor Description Response()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes()Returns the bytes.protected byte[]getBytesImpl()Returns the bytes.intgetCode()Returns the response code.java.lang.StringgetCodeString()Returns the code message.DataTypegetDataType()Returns the response type.protected DataTypegetDataTypeImpl()Returns a data type for this response based on the file.java.lang.ThrowablegetException()Returns the exception.WebFilegetFile()Returns the file.java.util.List<WebFile>getFiles()Returns the files (for directory request).RequestgetRequest()Returns the request.WebURLgetRequestURL()Returns the request URL.WebSitegetSite()Returns the site for the request/response.java.lang.StringgetText()Returns the text of the response.protected java.lang.StringgetTextImpl()Returns the text.longgetTime()Returns the response time.voidsetBytes(byte[] theBytes)Sets the response bytes.voidsetCode(int aCode)Sets the response code.protected voidsetDataType(DataType aType)Sets the data type.voidsetException(java.lang.Throwable aThrowable)Sets the exception.voidsetFile(WebFile aFile)Sets the file.voidsetFiles(java.util.List<WebFile> theFile)Sets the files (for directory request).voidsetRequest(Request aRequest)Sets the request.voidsetText(java.lang.String aString)Sets the text.java.lang.StringtoString()Standard toString implementation.
 
- 
- 
- 
Field Detail- 
OKpublic static final int OK - See Also:
- Constant Field Values
 
 - 
UNAUTHROIZEDpublic static final int UNAUTHROIZED - See Also:
- Constant Field Values
 
 - 
NOT_FOUNDpublic static final int NOT_FOUND - See Also:
- Constant Field Values
 
 - 
METHOD_NOT_ALLOWEDpublic static final int METHOD_NOT_ALLOWED - See Also:
- Constant Field Values
 
 - 
EXCEPTION_THROWNpublic static final int EXCEPTION_THROWN - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getRequestpublic Request getRequest() Returns the request.
 - 
setRequestpublic void setRequest(Request aRequest) Sets the request.
 - 
getRequestURLpublic WebURL getRequestURL() Returns the request URL.
 - 
getSitepublic WebSite getSite() Returns the site for the request/response.
 - 
getCodepublic int getCode() Returns the response code.
 - 
setCodepublic void setCode(int aCode) Sets the response code.
 - 
getCodeStringpublic java.lang.String getCodeString() Returns the code message.
 - 
getTimepublic long getTime() Returns the response time.
 - 
getDataTypepublic DataType getDataType() Returns the response type.
 - 
getDataTypeImplprotected DataType getDataTypeImpl() Returns a data type for this response based on the file.
 - 
setDataTypeprotected void setDataType(DataType aType) Sets the data type.
 - 
getFilepublic WebFile getFile() Returns the file.
 - 
setFilepublic void setFile(WebFile aFile) Sets the file.
 - 
getFilespublic java.util.List<WebFile> getFiles() Returns the files (for directory request).
 - 
setFilespublic void setFiles(java.util.List<WebFile> theFile) Sets the files (for directory request).
 - 
getBytespublic byte[] getBytes() Returns the bytes.
 - 
getBytesImplprotected byte[] getBytesImpl() Returns the bytes.
 - 
setBytespublic void setBytes(byte[] theBytes) Sets the response bytes.
 - 
getTextpublic java.lang.String getText() Returns the text of the response.
 - 
getTextImplprotected java.lang.String getTextImpl() Returns the text.
 - 
setTextpublic void setText(java.lang.String aString) Sets the text.
 - 
getExceptionpublic java.lang.Throwable getException() Returns the exception.
 - 
setExceptionpublic void setException(java.lang.Throwable aThrowable) Sets the exception.
 - 
toStringpublic java.lang.String toString() Standard toString implementation.- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-