Package com.openfin.desktop
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 exceptionstatic 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
-
Constructor Details
-
DesktopUtils
public DesktopUtils()
-
-
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 calledsource
- Source of the Ackex
- Exception for the Ack- See Also:
Ack
,AckListener
-
getNack
-
getNack
-
successAck
Call onSuccess of an AckListen- Parameters:
ackListener
- AckListener to be calledack
- an instance of Ack to be passed to ackListener- See Also:
Ack
,AckListener
-
errorAck
-
addEventListener
public static void addEventListener(Window window, java.lang.String evenType, EventListener eventListener) throws java.lang.ExceptionAdd event listener to a window. Since this blocks for response, it should NOT called on websocket read thread.- Parameters:
window
- an instance of WindowevenType
- type of eventeventListener
- 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()
-