Interface InteropClient

  • All Known Implementing Classes:
    InteropClientImpl

    public interface InteropClient
    Interop Client
    Author:
    Anthony
    • Method Detail

      • setContext

        CompletionStage<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

        CompletionStage<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

        CompletionStage<Void> addContextListener​(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

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

        CompletionStage<Void> removeContextListener​(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

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

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

        CompletionStage<Void> joinContextGroup​(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

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

        CompletionStage<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

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

        CompletionStage<ContextGroupInfo> getInfoForContextGroup​(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

        CompletionStage<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

        CompletionStage<Void> registerIntentListener​(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.
      • addConnectionListener

        boolean addConnectionListener​(InteropConnectionListener listener)
        Add a listener for interop channel connection lifecycle events.
        Parameters:
        listener - listener to add
        Returns:
        true if listener was added
      • removeConnectionListener

        boolean removeConnectionListener​(InteropConnectionListener listener)
        Remove a previously added interop channel connection listener.
        Parameters:
        listener - listener to remove
        Returns:
        true if listener was removed