Package com.inductiveautomation.snap.web
Class Response
- java.lang.Object
-
- com.inductiveautomation.snap.web.Response
-
public class Response extends java.lang.Object
The response.
-
-
Field Summary
Fields Modifier and Type Field Description static int
EXCEPTION_THROWN
static int
METHOD_NOT_ALLOWED
static int
NOT_FOUND
static int
OK
static int
UNAUTHROIZED
-
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.int
getCode()
Returns the response code.java.lang.String
getCodeString()
Returns the code message.DataType
getDataType()
Returns the response type.protected DataType
getDataTypeImpl()
Returns a data type for this response based on the file.java.lang.Throwable
getException()
Returns the exception.WebFile
getFile()
Returns the file.java.util.List<WebFile>
getFiles()
Returns the files (for directory request).Request
getRequest()
Returns the request.WebURL
getRequestURL()
Returns the request URL.WebSite
getSite()
Returns the site for the request/response.java.lang.String
getText()
Returns the text of the response.protected java.lang.String
getTextImpl()
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(java.lang.Throwable aThrowable)
Sets the exception.void
setFile(WebFile aFile)
Sets the file.void
setFiles(java.util.List<WebFile> theFile)
Sets the files (for directory request).void
setRequest(Request aRequest)
Sets the request.void
setText(java.lang.String aString)
Sets the text.java.lang.String
toString()
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:
toString
in classjava.lang.Object
-
-