Package adams.flow.container
Class HttpRequestResult
- java.lang.Object
-
- adams.flow.container.AbstractContainer
-
- adams.flow.container.HttpRequestResult
-
- All Implemented Interfaces:
CloneHandler<Container>
,GlobalInfoSupporter
,SpreadSheetSupporter
,Container
,Serializable
public class HttpRequestResult extends AbstractContainer
Container for storing the results of http requests.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
VALUE_BODY
the identifier for the result body (HTML).static String
VALUE_COOKIES
the identifier for the cookies (if any; Map).static String
VALUE_STATUSCODE
the identifier for the numeric status code.static String
VALUE_STATUSMESSAGE
the identifier for the status message.-
Fields inherited from class adams.flow.container.AbstractContainer
m_AdditionalNames, m_Help, m_Values
-
-
Constructor Summary
Constructors Constructor Description HttpRequestResult()
Default constructor.HttpRequestResult(int statusCode, String statusMessage, String body)
Initializes the container with the status code and body.HttpRequestResult(int statusCode, String statusMessage, String body, Map<String,String> cookies)
Initializes the container with the status code, body and cookies.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
initHelp()
Initializes the help strings.boolean
isValid()
Checks whether the setup of the container is valid.Iterator<String>
names()
Returns all value names that can be used (theoretically).-
Methods inherited from class adams.flow.container.AbstractContainer
addAdditionalName, addHelp, addHelp, addHelp, checkDefaultConstructor, getClone, getHelp, getValue, getValue, globalInfo, hasHelp, hasValue, isValidName, removeAdditionalName, setValue, store, stored, toSpreadSheet, toString
-
-
-
-
Field Detail
-
VALUE_STATUSCODE
public static final String VALUE_STATUSCODE
the identifier for the numeric status code.- See Also:
- Constant Field Values
-
VALUE_STATUSMESSAGE
public static final String VALUE_STATUSMESSAGE
the identifier for the status message.- See Also:
- Constant Field Values
-
VALUE_BODY
public static final String VALUE_BODY
the identifier for the result body (HTML).- See Also:
- Constant Field Values
-
VALUE_COOKIES
public static final String VALUE_COOKIES
the identifier for the cookies (if any; Map).- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HttpRequestResult
public HttpRequestResult()
Default constructor.
-
HttpRequestResult
public HttpRequestResult(int statusCode, String statusMessage, String body)
Initializes the container with the status code and body.- Parameters:
statusCode
- the status codestatusMessage
- the status messagebody
- the body (HTML)
-
HttpRequestResult
public HttpRequestResult(int statusCode, String statusMessage, String body, Map<String,String> cookies)
Initializes the container with the status code, body and cookies.- Parameters:
statusCode
- the status codestatusMessage
- the status messagebody
- the body (HTML)cookies
- the cookies, can be null
-
-
Method Detail
-
initHelp
protected void initHelp()
Initializes the help strings.- Overrides:
initHelp
in classAbstractContainer
-
names
public Iterator<String> names()
Returns all value names that can be used (theoretically).- Specified by:
names
in interfaceContainer
- Specified by:
names
in classAbstractContainer
- Returns:
- enumeration over all possible value names
-
isValid
public boolean isValid()
Checks whether the setup of the container is valid.- Specified by:
isValid
in interfaceContainer
- Specified by:
isValid
in classAbstractContainer
- Returns:
- true if all the necessary values are available
-
-