|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openfin.desktop.DesktopConnection
public class DesktopConnection
A object for launching, connecting to, and controlling AppDesktop.
| Constructor Summary | |
|---|---|
DesktopConnection(String uuid)
Creates a new connection to AppDesktop |
|
DesktopConnection(String uuid,
String host,
Integer port)
Creates a new connection to AppDesktop |
|
| Method Summary | |
|---|---|
void |
addEventCallback(org.json.JSONObject subscriptionObject,
EventListener listener,
AckListener callback,
Object source)
Registers an event listener on the specified event |
void |
addExternalMessageHandler(ExternalMessageListener listener,
Object source)
Registers a listener to handle messages for this connection's UUID originating via HTTPS/HTTP |
void |
connect(DesktopStateListener listener)
Deprecated. use connectToVersion(String, DesktopStateListener, int) instead. |
void |
connectToVersion(String desktopVersion,
DesktopStateListener listener,
int timeout)
Connect to specified version of Desktop. |
void |
disconnect()
Disconnects from AppDesktop |
void |
exit()
Notify AppDesktop to exit |
InterApplicationBus |
getInterApplicationBus()
Gets the Inter-Application message dispatcher associated with this DesktopConnection |
Integer |
getPort()
Gets port number that Runtime is running on |
boolean |
isConnected()
InterApplicationBus |
void |
launchAndConnect(String commandLineArguments,
DesktopStateListener listener,
int timeout)
Deprecated. use connectToVersion(String, DesktopStateListener, int) instead. |
void |
launchAndConnect(String desktopPath,
String commandLineArguments,
DesktopStateListener listener,
int timeout)
Deprecated. use connectToVersion(String, DesktopStateListener, int) instead. |
Integer |
registerNotificationListener(NotificationListener listener,
Object source)
Registers listener for a new notification |
void |
removeEventCallback(org.json.JSONObject subscriptionObject,
EventListener listener,
AckListener callback,
Object source)
Removes a previously registered event listener from the specified event |
protected void |
respondToPing(long pingId)
|
void |
sendAction(String action,
org.json.JSONObject payload)
Sends a message to AppDesktop |
void |
sendAction(String action,
org.json.JSONObject payload,
AckListener listener,
Object source)
Sends a message to AppDesktop |
void |
sendActionToNotificationsCenter(String action,
org.json.JSONObject payload,
AckListener callback,
Object source)
|
void |
setAdditionalRuntimeArguments(String additionalRuntimeArguments)
Set additional runtime arguments passed to the Runtime |
void |
setAdditionalRvmArguments(String additionalRvmArguments)
Set additional runtime arguments passed to the RVM |
void |
setLogLevel(boolean enabled)
Deprecated. |
void |
setRdmUrl(String url)
Set URL of RDM service |
void |
setRuntimeAssetsUrl(String url)
Set root URL/URI for the RVM and Runtime assets. |
void |
setRuntimeSecurityRealm(String runtimeSecurityRealm)
Set security realm of the Runtime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DesktopConnection(String uuid)
throws DesktopException
uuid - unique ID for AppDesktop to refer to this DesktopConnection
DesktopException
public DesktopConnection(String uuid,
String host,
Integer port)
throws DesktopException
uuid - unique ID for AppDesktop to refer to this DesktopConnectionhost - The host that AppDesktop is running onport - The port that AppDesktop is listening on for connections. -null if unknown
DesktopException| Method Detail |
|---|
public void launchAndConnect(String commandLineArguments,
DesktopStateListener listener,
int timeout)
throws URISyntaxException,
DesktopIOException
connectToVersion(String, DesktopStateListener, int) instead.
commandLineArguments - Command line arguments to start the AppDesktop withlistener - Receives updates on startup and connection statetimeout - For connecting to Desktop after launch. If the connection to AppDesktop is not established by the timeout the listener will get an onError() call
URISyntaxException
DesktopIOException
public void launchAndConnect(String desktopPath,
String commandLineArguments,
DesktopStateListener listener,
int timeout)
throws URISyntaxException,
DesktopIOException
connectToVersion(String, DesktopStateListener, int) instead.
desktopPath - Absolute path to the AppDesktop executablecommandLineArguments - Command line arguments to start the AppDesktop withlistener - Receives updates on startup and connection statetimeout - For connecting to Desktop after launch. If the connection to AppDesktop is not established by the timeout the listener will get an onError() call
URISyntaxException
DesktopIOException
public void connectToVersion(String desktopVersion,
DesktopStateListener listener,
int timeout)
throws URISyntaxException,
DesktopIOException,
IOException
desktopVersion - version of Desktop requiredlistener - Receives updates on startup and connection statetimeout - number of seconds to wait for connection. If connection to Runtime is not established by the timeout the listener will get an onError() call
URISyntaxException
DesktopIOException
IOException
public void disconnect()
throws DesktopException
DesktopExceptionpublic boolean isConnected()
public void exit()
throws DesktopException
DesktopExceptionpublic InterApplicationBus getInterApplicationBus()
public Integer getPort()
public void sendAction(String action,
org.json.JSONObject payload)
throws DesktopException,
DesktopIOException
action - The action of the messagepayload - The message object to send
DesktopException
DesktopIOException
public void sendAction(String action,
org.json.JSONObject payload,
AckListener listener,
Object source)
action - The action of the messagepayload - The message object to sendlistener - AckListener for the messagesource - Message sourceAckListener
public void connect(DesktopStateListener listener)
throws URISyntaxException,
DesktopIOException
connectToVersion(String, DesktopStateListener, int) instead.
listener - Receives updates on startup and connection state
URISyntaxException
DesktopIOExceptionDesktopStateListener
public Integer registerNotificationListener(NotificationListener listener,
Object source)
listener - NotificationListener for the notificationsource - Source of the request
NotificationListener
public void sendActionToNotificationsCenter(String action,
org.json.JSONObject payload,
AckListener callback,
Object source)
public void addEventCallback(org.json.JSONObject subscriptionObject,
EventListener listener,
AckListener callback,
Object source)
subscriptionObject - JSON object containing subscription information such as the topic and typelistener - EventListener for the eventcallback - AckListener for this requestsource - Source of this requestEventListener,
AckListener
public void removeEventCallback(org.json.JSONObject subscriptionObject,
EventListener listener,
AckListener callback,
Object source)
subscriptionObject - JSON object containing subscription information such as the topic and typelistener - EventListener that was registered beforecallback - AckListener for this requestsource - source of this requestprotected void respondToPing(long pingId)
public void addExternalMessageHandler(ExternalMessageListener listener,
Object source)
listener - process a received HTTPS/HTTP message for this connectionsource - The object that originally registered the listenerpublic void setAdditionalRuntimeArguments(String additionalRuntimeArguments)
additionalRuntimeArguments - additional arguments, such as "--v=1" to enable more loggingpublic void setAdditionalRvmArguments(String additionalRvmArguments)
additionalRvmArguments - additional argumentspublic void setRuntimeSecurityRealm(String runtimeSecurityRealm)
runtimeSecurityRealm - name of the realmpublic void setRdmUrl(String url)
url - public void setRuntimeAssetsUrl(String url)
url/rvm url/runtime
url - public void setLogLevel(boolean enabled)
enabled -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||