Class Ack

java.lang.Object
java.util.EventObject
com.openfin.desktop.Ack
All Implemented Interfaces:
java.io.Serializable

public class Ack
extends java.util.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
  • Constructor Summary

    Constructors 
    Constructor Description
    Ack​(org.json.JSONObject object, java.lang.Object source)
    Ack constructor
  • Method Summary

    Modifier and Type Method Description
    java.lang.Object getData()
    Returns the value of "data" from message as JObject
    java.lang.String getErrorStack()
    When the ack was not successful, it might cause Openfin Desktop Runtime error.
    org.json.JSONObject getJsonObject()
    Returns the message as a JObject
    java.lang.String getReason()
    Return reason if Ack has error
    boolean isSuccessful()
    Returns Returns true if message contains "success":"true"

    Methods inherited from class java.util.EventObject

    getSource, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Ack

      public Ack​(org.json.JSONObject object, java.lang.Object source)
      Ack constructor
      Parameters:
      object - Message being delivered to the listener
      source - The message source
  • Method Details

    • isSuccessful

      public boolean isSuccessful()
      Returns Returns true if message contains "success":"true"
      Returns:
      Returns true if message contains "success":"true"
    • getReason

      public java.lang.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 java.lang.Object getData()
      Returns the value of "data" from message as JObject
      Returns:
      the value of "data" from message as JObject
    • getErrorStack

      public java.lang.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.