Interface InteropClient

All Known Implementing Classes:
InteropClientImpl

public interface InteropClient
Interop Client
Author:
Anthony
  • 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 contextListener)
    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 contextListener)
    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.
  • Method Details

    • setContext

      java.util.concurrent.CompletionStage<java.lang.Void> setContext​(Context context)
      Sets a context for the context group of the current entity.
      Parameters:
      context - New context to set.
      Returns:
      A new CompletionStage for the task.
    • addContextListener

      java.util.concurrent.CompletionStage<java.lang.Void> addContextListener​(ContextListener contextListener)
      Adds a context listener for incoming context.
      Parameters:
      contextListener - The listener for incoming context.
      Returns:
      A new CompletionStage for the task.
    • addContextListener

      java.util.concurrent.CompletionStage<java.lang.Void> addContextListener​(java.lang.String contextType, ContextListener contextListener)
      Adds a context listener for incoming context of specified context type.
      Parameters:
      contextType - The context type to listen to.
      contextListener - The listener for incoming context.
      Returns:
      A new CompletionStage for the task.
    • removeContextListener

      java.util.concurrent.CompletionStage<java.lang.Void> removeContextListener​(ContextListener contextListener)
      Removes the context listener.
      Parameters:
      contextListener - The listener to be removed.
      Returns:
      A new CompletionStage for the task.
    • removeContextListener

      java.util.concurrent.CompletionStage<java.lang.Void> removeContextListener​(java.lang.String contextType, ContextListener contextListener)
      Remove the context listener of specified context type.
      Parameters:
      contextType - The context type that the listener is listened to.
      contextListener - The listener to be removed.
      Returns:
      A new CompletionStage for the task.
    • getContextGroups

      java.util.concurrent.CompletionStage<ContextGroupInfo[]> getContextGroups()
      Gets the Interop-Broker-defined context groups available for an entity to join.
      Returns:
      A new CompletionStage for the the array of the context group info.
    • joinContextGroup

      java.util.concurrent.CompletionStage<java.lang.Void> joinContextGroup​(java.lang.String contextGroupId)
      Joins this InteropClient to the context group.
      Parameters:
      contextGroupId - The id of context group.
      Returns:
      A new CompletionStage for the task.
    • joinContextGroup

      java.util.concurrent.CompletionStage<java.lang.Void> joinContextGroup​(java.lang.String contextGroupId, Identity target)
      Joins specified InteropClient to the context group.
      Parameters:
      contextGroupId - The id of context group.
      target - The identity of the target InteropClient.
      Returns:
      A new CompletionStage for the task.
    • removeFromContextGroup

      java.util.concurrent.CompletionStage<java.lang.Void> removeFromContextGroup()
      Removes this InteropClient from the context group it currently joined.
      Returns:
      A new CompletionStage for the task.
    • removeFromContextGroup

      java.util.concurrent.CompletionStage<java.lang.Void> removeFromContextGroup​(Identity target)
      Removes specified InteropClient from the context group it currently joined.
      Parameters:
      target - The identity of the target InteropClient.
      Returns:
      A new CompletionStage for the task.
    • getAllClientsInContextGroup

      java.util.concurrent.CompletionStage<ClientIdentity[]> getAllClientsInContextGroup​(java.lang.String contextGroupId)
      Gets all clients for a context group.
      Parameters:
      contextGroupId - The id of context group.
      Returns:
      A new CompletionStage for the the array of all clients in the context group.
    • getInfoForContextGroup

      java.util.concurrent.CompletionStage<ContextGroupInfo> getInfoForContextGroup​(java.lang.String contextGroupId)
      Gets display info for a context group.
      Parameters:
      contextGroupId - The id of context group.
      Returns:
      A new CompletionStage for the context group info.
    • fireIntent

      java.util.concurrent.CompletionStage<java.lang.Void> fireIntent​(Intent intent)
      Sends an intent to the Interop Broker to resolve.
      Parameters:
      intent - New intent to send.
      Returns:
      A new CompletionStage for the task.
    • registerIntentListener

      java.util.concurrent.CompletionStage<java.lang.Void> registerIntentListener​(java.lang.String intentName, IntentListener intentListener)
      Register an intent listener for incoming intent.
      Parameters:
      intentName - name of the intent
      intentListener - The listener for incoming intent.
      Returns:
      A new CompletionStage for the task.