Class DesktopUtils

java.lang.Object
com.openfin.desktop.DesktopUtils

public class DesktopUtils
extends java.lang.Object
Helper methods
Since:
12/8/14
Author:
wche
  • Constructor Summary

    Constructors 
    Constructor Description
    DesktopUtils()  
  • Method Summary

    Modifier and Type Method Description
    static void addEventListener​(Window window, java.lang.String evenType, EventListener eventListener)
    Add event listener to a window.
    static void errorAck​(AckListener callback, Ack ack)  
    static void errorAckOnException​(AckListener ackListener, java.lang.Object source, java.lang.Exception ex)
    Call onError of an AckListen for an exception
    static Ack getNack​(java.lang.Object source, java.lang.Exception ex)  
    static Ack getNack​(java.lang.Object source, java.lang.String reason)  
    static boolean isMac()  
    static boolean isUnix()  
    static boolean isWindows()  
    static void successAck​(AckListener ackListener, Ack ack)
    Call onSuccess of an AckListen

    Methods inherited from class java.lang.Object

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

  • Method Details

    • errorAckOnException

      public static void errorAckOnException​(AckListener ackListener, java.lang.Object source, java.lang.Exception ex)
      Call onError of an AckListen for an exception
      Parameters:
      ackListener - AckListener to be called
      source - Source of the Ack
      ex - Exception for the Ack
      See Also:
      Ack, AckListener
    • getNack

      public static Ack getNack​(java.lang.Object source, java.lang.Exception ex)
    • getNack

      public static Ack getNack​(java.lang.Object source, java.lang.String reason)
    • successAck

      public static void successAck​(AckListener ackListener, Ack ack)
      Call onSuccess of an AckListen
      Parameters:
      ackListener - AckListener to be called
      ack - an instance of Ack to be passed to ackListener
      See Also:
      Ack, AckListener
    • errorAck

      public static void errorAck​(AckListener callback, Ack ack)
    • addEventListener

      public static void addEventListener​(Window window, java.lang.String evenType, EventListener eventListener) throws java.lang.Exception
      Add event listener to a window. Since this blocks for response, it should NOT called on websocket read thread.
      Parameters:
      window - an instance of Window
      evenType - type of event
      eventListener - EventListner to be added
      Throws:
      java.lang.Exception - if this method fails to add event listener
    • isWindows

      public static boolean isWindows()
    • isMac

      public static boolean isMac()
    • isUnix

      public static boolean isUnix()