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 void
addContextListener(ContextListener callback, AckListener ackListener)
Adds a listener for incoming context broadcast from the Desktop Agent.void
addIntentListener(java.lang.String intent, IntentListener listener, AckListener ackListener)
Adds a listener for incoming Intents from the Agent.void
broadcast(Context context, AckListener ackListener)
Publishes context to other apps on the desktop.void
connect(AckListener ackListener)
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.void
findIntentsByContext(Context context, AsyncCallback<java.util.List<AppIntent>> callback)
Find all the avalable intents for a particular context.void
getChannelById(java.lang.String id, AsyncCallback<Channel> callback)
void
getDefaultChannel(AsyncCallback<Channel> callback)
static FDC3Client
getInstance(DesktopConnection desktopConnection)
protected void
onChannelConnected()
void
open(java.lang.String name, Context context, AckListener ackListener)
Launches/links to an application by name.void
raiseIntent(java.lang.String intent, Context context, java.lang.String target, AsyncCallback<IntentResolution> callback)
Raises an intent to the desktop agent to resolve.boolean
removeContextListener(ContextListener listener)
-
Method Details
-
getInstance
-
connect
- Overrides:
connect
in 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 wrappedIntentResolution
object
-
onChannelConnected
protected void onChannelConnected()- Overrides:
onChannelConnected
in 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
-