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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • setContext

      public java.util.concurrent.CompletionStage<java.lang.Void> setContext​(Context context)
      Description copied from interface: InteropClient
      Sets a context for the context group of the current entity.
      Specified by:
      setContext in interface InteropClient
      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: InteropClient
      Adds a context listener for incoming context.
      Specified by:
      addContextListener in interface InteropClient
      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: InteropClient
      Adds a context listener for incoming context of specified context type.
      Specified by:
      addContextListener in interface InteropClient
      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: InteropClient
      Removes the context listener.
      Specified by:
      removeContextListener in interface InteropClient
      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: InteropClient
      Remove the context listener of specified context type.
      Specified by:
      removeContextListener in interface InteropClient
      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

      public java.util.concurrent.CompletionStage<ContextGroupInfo[]> getContextGroups()
      Description copied from interface: InteropClient
      Gets the Interop-Broker-defined context groups available for an entity to join.
      Specified by:
      getContextGroups in interface InteropClient
      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: InteropClient
      Joins this InteropClient to the context group.
      Specified by:
      joinContextGroup in interface InteropClient
      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: InteropClient
      Joins specified InteropClient to the context group.
      Specified by:
      joinContextGroup in interface InteropClient
      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: InteropClient
      Removes this InteropClient from the context group it currently joined.
      Specified by:
      removeFromContextGroup in interface InteropClient
      Returns:
      A new CompletionStage for the task.
    • removeFromContextGroup

      public java.util.concurrent.CompletionStage<java.lang.Void> removeFromContextGroup​(Identity target)
      Description copied from interface: InteropClient
      Removes specified InteropClient from the context group it currently joined.
      Specified by:
      removeFromContextGroup in interface InteropClient
      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: InteropClient
      Gets all clients for a context group.
      Specified by:
      getAllClientsInContextGroup in interface InteropClient
      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: InteropClient
      Gets display info for a context group.
      Specified by:
      getInfoForContextGroup in interface InteropClient
      Parameters:
      contextGroupId - The id of context group.
      Returns:
      A new CompletionStage for the context group info.
    • fireIntent

      public java.util.concurrent.CompletionStage<java.lang.Void> fireIntent​(Intent intent)
      Description copied from interface: InteropClient
      Sends an intent to the Interop Broker to resolve.
      Specified by:
      fireIntent in interface InteropClient
      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: InteropClient
      Register an intent listener for incoming intent.
      Specified by:
      registerIntentListener in interface InteropClient
      Parameters:
      intentName - name of the intent
      intentListener - The listener for incoming intent.
      Returns:
      A new CompletionStage for the task.