Interface IrisWidgetSupport

All Known Subinterfaces:
IrisConsoleWidgetSupport
All Known Implementing Classes:
IrisConsole

public interface IrisWidgetSupport
A support object to provide common utilities for widgets derived from queries
  • Method Details

    • getControllerClient

      @NotNull PersistentQueryControllerClient getControllerClient()
      Get the controller client for listening to / querying statuses.
      Returns:
      a PersistentQueryControllerClient
    • getPersistentQueryClient

      @Nullable PersistentQueryClient getPersistentQueryClient(long serial)
      Get the PersistentQueryClient for the specified query serial
      Parameters:
      serial - the query serial.
      Returns:
      the PersistentQueryControllerClient or null if the query does not exist, or is not running.
    • getIrisUserContext

      @NotNull IrisUserContext getIrisUserContext()
      Get the user context for the currently authenticated user.
      Returns:
      the user context
    • getServerConfiguration

      @Nullable PersistentQueryControllerConfiguration getServerConfiguration()
      Get the current controller configuration.
      Returns:
      the current configuration
    • addControllerConnectionListener

      void addControllerConnectionListener(@NotNull Consumer<Boolean> listener)
      Listen for events when the controller client connection status changes. If the controller client is connected your Consumer is called with true. If it is disconnected, your Consumer is called with false.
      Parameters:
      listener - a consumer that is called on connection status changes.
    • removeControllerConnectionListener

      void removeControllerConnectionListener(@NotNull Consumer<Boolean> listener)
      Removes a previously added controller connection listener.
      Parameters:
      listener - the listener to remove
    • getQueryClient

      @NotNull PersistentQueryClient getQueryClient(@NotNull String queryType) throws IOException
      Get a client for the specified query type. If more than one query of this type is defined, it will use the first one that is Running. It is intended to be used to connect to helper queries.
      Parameters:
      queryType - the query type
      Returns:
      the query client
      Throws:
      IOException - if a connection can't be established to a query of the specified type