Package com.openfin.desktop
Class Ack
- java.lang.Object
-
- java.util.EventObject
-
- com.openfin.desktop.Ack
-
- All Implemented Interfaces:
Serializable
public class Ack extends EventObject
A message that is delivered to an AckListener when an action has been processed by AppDesktop- See Also:
AckListener, Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetData()Returns the value of "data" from message as JObjectStringgetErrorStack()When the ack was not successful, it might cause Openfin Desktop Runtime error.org.json.JSONObjectgetJsonObject()Returns the message as a JObjectStringgetReason()Return reason if Ack has errorbooleanisSuccessful()Returns Returns true if message contains "success":"true"-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
Ack
public Ack(org.json.JSONObject object, Object source)Ack constructor- Parameters:
object- Message being delivered to the listenersource- The message source
-
-
Method Detail
-
isSuccessful
public boolean isSuccessful()
Returns Returns true if message contains "success":"true"- Returns:
- Returns true if message contains "success":"true"
-
getReason
public String getReason()
Return reason if Ack has error- Returns:
- reason for error
-
getJsonObject
public org.json.JSONObject getJsonObject()
Returns the message as a JObject- Returns:
- the message as a JObject
-
getData
public Object getData()
Returns the value of "data" from message as JObject- Returns:
- the value of "data" from message as JObject
-
getErrorStack
public String getErrorStack()
When the ack was not successful, it might cause Openfin Desktop Runtime error. This method returns the stack trace of the error, if it's available.- Returns:
- the stack trace of runtime error, null if not available.
-
-