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
All Methods Static Methods Instance Methods Concrete Methods 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)-
Methods inherited from class com.openfin.desktop.channel.AbstractServiceClient
setChannelName
-
-
-
-
Method Detail
-
getInstance
public static FDC3Client getInstance(DesktopConnection desktopConnection)
-
connect
public void connect(AckListener ackListener)
- Overrides:
connectin classAbstractServiceClient
-
open
public void open(java.lang.String name, Context context, AckListener ackListener)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
public void broadcast(Context context, AckListener ackListener)
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
public void addContextListener(ContextListener callback, AckListener ackListener)
Adds a listener for incoming context broadcast from the Desktop Agent.- Parameters:
callback- The context listenerackListener- AckListener for the request
-
removeContextListener
public boolean removeContextListener(ContextListener listener)
-
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
public void getChannelById(java.lang.String id, AsyncCallback<Channel> callback)
-
getDefaultChannel
public void getDefaultChannel(AsyncCallback<Channel> callback)
-
-