Class ExpectedRequestParameter
java.lang.Object
com.pixelservices.flash.components.http.expected.ExpectedRequestParameter
The ExpectedRequestParameter lets you assume the existence of a parameter in the request and work with it
-
Constructor Summary
ConstructorsConstructorDescriptionExpectedRequestParameter
(String parameterName, RequestHandler requestHandler) Constructor for ExpectedRequestParameterExpectedRequestParameter
(String parameterName, String description, RequestHandler requestHandler) Constructor for ExpectedRequestParameter -
Method Summary
Modifier and TypeMethodDescriptionGet the field value as a BooleangetByte()
Get the field value as a Bytechar
getChar()
Get the field value as a CharacterGet description of the fieldGet the field value as a DoubleGet the field value.getFloat()
Get the field value as a FloatgetInt()
Get the field value as an Integerorg.json.JSONObject
Get the field value as a JSONObjectgetLong()
Get the field value as a LonggetShort()
Get the field value as a ShortGet the field value as a String
-
Constructor Details
-
ExpectedRequestParameter
Constructor for ExpectedRequestParameter- Parameters:
parameterName
- The name of the parameter to be retrieved from the requestrequestHandler
- The RequestHandler object
-
ExpectedRequestParameter
public ExpectedRequestParameter(String parameterName, String description, RequestHandler requestHandler) Constructor for ExpectedRequestParameter- Parameters:
parameterName
- The name of the parameter to be retrieved from the requestrequestHandler
- The RequestHandler object
-
-
Method Details
-
getFieldValue
Get the field value. If the parameter has multiple values, return the first by default. To retrieve all values, use getFieldValues().- Returns:
- The field value (first value if multiple exist).
-
getString
Get the field value as a String- Returns:
- The field value as a String
-
getInt
Get the field value as an Integer- Returns:
- The field value as an Integer
-
getBoolean
Get the field value as a Boolean- Returns:
- The field value as a Boolean
-
getLong
Get the field value as a Long- Returns:
- The field value as a Long
-
getDouble
Get the field value as a Double- Returns:
- The field value as a Double
-
getFloat
Get the field value as a Float- Returns:
- The field value as a Float
-
getByte
Get the field value as a Byte- Returns:
- The field value as a Byte
-
getShort
Get the field value as a Short- Returns:
- The field value as a Short
-
getChar
public char getChar()Get the field value as a Character- Returns:
- The field value as a Character
-
getJSONObject
public org.json.JSONObject getJSONObject()Get the field value as a JSONObject- Returns:
- The field value as a JSONObject
-
getDescription
Get description of the field- Returns:
- The description of the field
-