Package com.openfin.desktop.fdc3
Class FDC3Client
java.lang.Object
com.openfin.desktop.channel.AbstractServiceClient
com.openfin.desktop.fdc3.FDC3Client
public class FDC3Client extends AbstractServiceClient
-
Field Summary
Fields inherited from class com.openfin.desktop.channel.AbstractServiceClient
channelClient, channelName, desktopConnection, logger -
Method Summary
Modifier and Type Method Description voidaddContextListener(ContextListener callback, AckListener ackListener)Adds a listener for incoming context broadcast from the Desktop Agent.voidaddIntentListener(java.lang.String intent, IntentListener listener, AckListener ackListener)Adds a listener for incoming Intents from the Agent.voidbroadcast(Context context, AckListener ackListener)Publishes context to other apps on the desktop.voidconnect(AckListener ackListener)voidfindIntent(java.lang.String intent, Context context, AsyncCallback<AppIntent> callback)Find out more information about a particular intent by passing its name, and optionally its context.voidfindIntentsByContext(Context context, AsyncCallback<java.util.List<AppIntent>> callback)Find all the avalable intents for a particular context.voidgetChannelById(java.lang.String id, AsyncCallback<Channel> callback)voidgetDefaultChannel(AsyncCallback<Channel> callback)static FDC3ClientgetInstance(DesktopConnection desktopConnection)protected voidonChannelConnected()voidopen(java.lang.String name, Context context, AckListener ackListener)Launches/links to an application by name.voidraiseIntent(java.lang.String intent, Context context, java.lang.String target, AsyncCallback<IntentResolution> callback)Raises an intent to the desktop agent to resolve.booleanremoveContextListener(ContextListener listener)
-
Method Details
-
getInstance
-
connect
- Overrides:
connectin classAbstractServiceClient
-
open
Launches/links to an application by name.- Parameters:
name- Application namecontext- Context object that will be provided to the opened application via a contextListenerackListener- AckListener for the request
-
broadcast
Publishes context to other apps on the desktop.- Parameters:
context- Context objectackListener- AckListener for the request
-
findIntent
public void findIntent(java.lang.String intent, Context context, AsyncCallback<AppIntent> callback)Find out more information about a particular intent by passing its name, and optionally its context.- Parameters:
intent- Intent namecontext- Context Objectcallback- AckListener for the request
-
findIntentsByContext
public void findIntentsByContext(Context context, AsyncCallback<java.util.List<AppIntent>> callback)Find all the avalable intents for a particular context.- Parameters:
context- Context Objectcallback- AckListener for the request
-
raiseIntent
public void raiseIntent(java.lang.String intent, Context context, java.lang.String target, AsyncCallback<IntentResolution> callback)Raises an intent to the desktop agent to resolve.- Parameters:
intent- Intent namecontext- Context objecttarget- Raise the intent to specified target.callback- The callback that receives the wrappedIntentResolutionobject
-
onChannelConnected
protected void onChannelConnected()- Overrides:
onChannelConnectedin classAbstractServiceClient
-
addContextListener
Adds a listener for incoming context broadcast from the Desktop Agent.- Parameters:
callback- The context listenerackListener- AckListener for the request
-
removeContextListener
-
addIntentListener
public void addIntentListener(java.lang.String intent, IntentListener listener, AckListener ackListener)Adds a listener for incoming Intents from the Agent.- Parameters:
intent- Intent namelistener- The intent listenerackListener- AckListener for the request
-
getChannelById
-
getDefaultChannel
-