Class DesktopUtils


  • public class DesktopUtils
    extends Object
    Helper methods
    Since:
    12/8/14
    Author:
    wche
    • Constructor Detail

      • DesktopUtils

        public DesktopUtils()
    • Method Detail

      • errorAckOnException

        public static void errorAckOnException​(AckListener ackListener,
                                               Object source,
                                               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
      • 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,
                                            String evenType,
                                            EventListener eventListener)
                                     throws 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:
        Exception - if this method fails to add event listener
      • isWindows

        public static boolean isWindows()
      • isMac

        public static boolean isMac()
      • isUnix

        public static boolean isUnix()