Package com.inductiveautomation.snap.web
Class Response
- java.lang.Object
-
- com.inductiveautomation.snap.web.Response
-
public class Response extends java.lang.ObjectThe response.
-
-
Field Summary
Fields Modifier and Type Field Description static intEXCEPTION_THROWNstatic intMETHOD_NOT_ALLOWEDstatic intNOT_FOUNDstatic intOKstatic intUNAUTHROIZED
-
Constructor Summary
Constructors Constructor Description Response()
-
Method Summary
All 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
-
OK
public static final int OK
- See Also:
- Constant Field Values
-
UNAUTHROIZED
public static final int UNAUTHROIZED
- See Also:
- Constant Field Values
-
NOT_FOUND
public static final int NOT_FOUND
- See Also:
- Constant Field Values
-
METHOD_NOT_ALLOWED
public static final int METHOD_NOT_ALLOWED
- See Also:
- Constant Field Values
-
EXCEPTION_THROWN
public static final int EXCEPTION_THROWN
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRequest
public Request getRequest()
Returns the request.
-
setRequest
public void setRequest(Request aRequest)
Sets the request.
-
getRequestURL
public WebURL getRequestURL()
Returns the request URL.
-
getSite
public WebSite 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
public java.lang.String getCodeString()
Returns the code message.
-
getTime
public long getTime()
Returns the response time.
-
getDataType
public DataType getDataType()
Returns the response type.
-
getDataTypeImpl
protected DataType getDataTypeImpl()
Returns a data type for this response based on the file.
-
setDataType
protected void setDataType(DataType aType)
Sets the data type.
-
getFile
public WebFile getFile()
Returns the file.
-
setFile
public void setFile(WebFile aFile)
Sets the file.
-
getFiles
public java.util.List<WebFile> getFiles()
Returns the files (for directory request).
-
setFiles
public void setFiles(java.util.List<WebFile> theFile)
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
public java.lang.String getText()
Returns the text of the response.
-
getTextImpl
protected java.lang.String getTextImpl()
Returns the text.
-
setText
public void setText(java.lang.String aString)
Sets the text.
-
getException
public java.lang.Throwable getException()
Returns the exception.
-
setException
public void setException(java.lang.Throwable aThrowable)
Sets the exception.
-
toString
public java.lang.String toString()
Standard toString implementation.- Overrides:
toStringin classjava.lang.Object
-
-