| Constructor and Description |
|---|
Engagement(java.lang.String decisionPoint)
Creates a new instance.
|
Engagement(java.lang.String decisionPoint,
Params params)
Creates a new instance, with parameters.
|
Engagement(java.lang.String decisionPoint,
java.lang.String flavour)
Creates a new instance, with a flavour.
|
Engagement(java.lang.String decisionPoint,
java.lang.String flavour,
Params params)
Creates a new instance, with a flavour and parameters.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDecisionPoint() |
java.lang.String |
getError()
Gets the error message of the response after the Engage request has
completed with a failure.
|
org.json.JSONObject |
getJson()
Gets the JSON body of the response after the Engage request has
completed with a success.
|
int |
getStatusCode()
Gets the status code of the response after the Engage request has
completed.
|
boolean |
isCached()
Gets whether the response was retrieved from the cache.
|
boolean |
isSuccessful()
Gets whether the response was successful after the Engage request has
completed.
|
T |
putParam(java.lang.String key,
JsonParams value)
Puts nested parameters under the key.
|
T |
putParam(java.lang.String key,
java.lang.Object value)
Puts the key/value pair into the event parameters.
|
java.lang.String |
toString() |
public Engagement(java.lang.String decisionPoint)
decisionPoint - the decision pointpublic Engagement(java.lang.String decisionPoint,
Params params)
decisionPoint - the decision pointparams - the parameterspublic Engagement(java.lang.String decisionPoint,
java.lang.String flavour)
decisionPoint - the decision pointflavour - the flavourpublic Engagement(java.lang.String decisionPoint,
java.lang.String flavour,
Params params)
decisionPoint - the decision pointflavour - the flavourparams - the parameterspublic T putParam(java.lang.String key, java.lang.Object value)
EventputParam in class Event<T extends Engagement<T>>key - the keyvalue - the valueT instancepublic T putParam(java.lang.String key, JsonParams value)
EventputParam in class Event<T extends Engagement<T>>key - the keyvalue - the valueT instancepublic java.lang.String toString()
toString in class java.lang.Objectpublic int getStatusCode()
The status code may be outside of the successful HTTP range of 2xx in the case where the request has failed, but a previous response was successfully retrieved from the cache.
0 if the request
hasn't completed yetpublic boolean isCached()
true if the response is cached, else falsepublic boolean isSuccessful()
true if the response was a success, else false@Nullable public org.json.JSONObject getJson()
null if the request
failed@Nullable public java.lang.String getError()
null if the
request succeededpublic java.lang.String getDecisionPoint()