Package com.openfin.desktop.interop
Class InteropClientImpl
java.lang.Object
com.openfin.desktop.interop.InteropClientImpl
- All Implemented Interfaces:
InteropClient
public class InteropClientImpl extends java.lang.Object implements InteropClient
-
Constructor Summary
Constructors Constructor Description InteropClientImpl(DesktopConnection conn, java.lang.String brokerName) -
Method Summary
Modifier and Type Method Description java.util.concurrent.CompletionStage<java.lang.Void>addContextListener(ContextListener contextListener)Adds a context listener for incoming context.java.util.concurrent.CompletionStage<java.lang.Void>addContextListener(java.lang.String contextType, ContextListener listener)Adds a context listener for incoming context of specified context type.java.util.concurrent.CompletionStage<java.lang.Void>fireIntent(Intent intent)Sends an intent to the Interop Broker to resolve.java.util.concurrent.CompletionStage<ClientIdentity[]>getAllClientsInContextGroup(java.lang.String contextGroupId)Gets all clients for a context group.java.util.concurrent.CompletionStage<ContextGroupInfo[]>getContextGroups()Gets the Interop-Broker-defined context groups available for an entity to join.java.util.concurrent.CompletionStage<ContextGroupInfo>getInfoForContextGroup(java.lang.String contextGroupId)Gets display info for a context group.java.util.concurrent.CompletionStage<java.lang.Void>joinContextGroup(java.lang.String contextGroupId)Joins this InteropClient to the context group.java.util.concurrent.CompletionStage<java.lang.Void>joinContextGroup(java.lang.String contextGroupId, Identity target)Joins specified InteropClient to the context group.java.util.concurrent.CompletionStage<java.lang.Void>registerIntentListener(java.lang.String intentName, IntentListener intentListener)Register an intent listener for incoming intent.java.util.concurrent.CompletionStage<java.lang.Void>removeContextListener(ContextListener contextListener)Removes the context listener.java.util.concurrent.CompletionStage<java.lang.Void>removeContextListener(java.lang.String contextType, ContextListener listener)Remove the context listener of specified context type.java.util.concurrent.CompletionStage<java.lang.Void>removeFromContextGroup()Removes this InteropClient from the context group it currently joined.java.util.concurrent.CompletionStage<java.lang.Void>removeFromContextGroup(Identity target)Removes specified InteropClient from the context group it currently joined.java.util.concurrent.CompletionStage<java.lang.Void>setContext(Context context)Sets a context for the context group of the current entity.
-
Constructor Details
-
Method Details
-
setContext
Description copied from interface:InteropClientSets a context for the context group of the current entity.- Specified by:
setContextin interfaceInteropClient- Parameters:
context- New context to set.- Returns:
- A new CompletionStage for the task.
-
addContextListener
public java.util.concurrent.CompletionStage<java.lang.Void> addContextListener(ContextListener contextListener)Description copied from interface:InteropClientAdds a context listener for incoming context.- Specified by:
addContextListenerin interfaceInteropClient- Parameters:
contextListener- The listener for incoming context.- Returns:
- A new CompletionStage for the task.
-
addContextListener
public java.util.concurrent.CompletionStage<java.lang.Void> addContextListener(java.lang.String contextType, ContextListener listener)Description copied from interface:InteropClientAdds a context listener for incoming context of specified context type.- Specified by:
addContextListenerin interfaceInteropClient- Parameters:
contextType- The context type to listen to.listener- The listener for incoming context.- Returns:
- A new CompletionStage for the task.
-
removeContextListener
public java.util.concurrent.CompletionStage<java.lang.Void> removeContextListener(ContextListener contextListener)Description copied from interface:InteropClientRemoves the context listener.- Specified by:
removeContextListenerin interfaceInteropClient- Parameters:
contextListener- The listener to be removed.- Returns:
- A new CompletionStage for the task.
-
removeContextListener
public java.util.concurrent.CompletionStage<java.lang.Void> removeContextListener(java.lang.String contextType, ContextListener listener)Description copied from interface:InteropClientRemove the context listener of specified context type.- Specified by:
removeContextListenerin interfaceInteropClient- Parameters:
contextType- The context type that the listener is listened to.listener- The listener to be removed.- Returns:
- A new CompletionStage for the task.
-
getContextGroups
Description copied from interface:InteropClientGets the Interop-Broker-defined context groups available for an entity to join.- Specified by:
getContextGroupsin interfaceInteropClient- Returns:
- A new CompletionStage for the the array of the context group info.
-
joinContextGroup
public java.util.concurrent.CompletionStage<java.lang.Void> joinContextGroup(java.lang.String contextGroupId)Description copied from interface:InteropClientJoins this InteropClient to the context group.- Specified by:
joinContextGroupin interfaceInteropClient- Parameters:
contextGroupId- The id of context group.- Returns:
- A new CompletionStage for the task.
-
joinContextGroup
public java.util.concurrent.CompletionStage<java.lang.Void> joinContextGroup(java.lang.String contextGroupId, Identity target)Description copied from interface:InteropClientJoins specified InteropClient to the context group.- Specified by:
joinContextGroupin interfaceInteropClient- Parameters:
contextGroupId- The id of context group.target- The identity of the target InteropClient.- Returns:
- A new CompletionStage for the task.
-
removeFromContextGroup
public java.util.concurrent.CompletionStage<java.lang.Void> removeFromContextGroup()Description copied from interface:InteropClientRemoves this InteropClient from the context group it currently joined.- Specified by:
removeFromContextGroupin interfaceInteropClient- Returns:
- A new CompletionStage for the task.
-
removeFromContextGroup
public java.util.concurrent.CompletionStage<java.lang.Void> removeFromContextGroup(Identity target)Description copied from interface:InteropClientRemoves specified InteropClient from the context group it currently joined.- Specified by:
removeFromContextGroupin interfaceInteropClient- Parameters:
target- The identity of the target InteropClient.- Returns:
- A new CompletionStage for the task.
-
getAllClientsInContextGroup
public java.util.concurrent.CompletionStage<ClientIdentity[]> getAllClientsInContextGroup(java.lang.String contextGroupId)Description copied from interface:InteropClientGets all clients for a context group.- Specified by:
getAllClientsInContextGroupin interfaceInteropClient- Parameters:
contextGroupId- The id of context group.- Returns:
- A new CompletionStage for the the array of all clients in the context group.
-
getInfoForContextGroup
public java.util.concurrent.CompletionStage<ContextGroupInfo> getInfoForContextGroup(java.lang.String contextGroupId)Description copied from interface:InteropClientGets display info for a context group.- Specified by:
getInfoForContextGroupin interfaceInteropClient- Parameters:
contextGroupId- The id of context group.- Returns:
- A new CompletionStage for the context group info.
-
fireIntent
Description copied from interface:InteropClientSends an intent to the Interop Broker to resolve.- Specified by:
fireIntentin interfaceInteropClient- Parameters:
intent- New intent to send.- Returns:
- A new CompletionStage for the task.
-
registerIntentListener
public java.util.concurrent.CompletionStage<java.lang.Void> registerIntentListener(java.lang.String intentName, IntentListener intentListener)Description copied from interface:InteropClientRegister an intent listener for incoming intent.- Specified by:
registerIntentListenerin interfaceInteropClient- Parameters:
intentName- name of the intentintentListener- The listener for incoming intent.- Returns:
- A new CompletionStage for the task.
-