Package com.illumon.iris.controller
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 Summary
Modifier and TypeMethodDescriptionvoidaddControllerConnectionListener(Consumer<Boolean> listener) Listen for events when the controller client connection status changes.Get the controller client for listening to / querying statuses.Get theuser contextfor the currently authenticated user.getPersistentQueryClient(long serial) Get thePersistentQueryClientfor the specified query serialgetQueryClient(String queryType) Get a client for the specified query type.Get the current controller configuration.voidremoveControllerConnectionListener(Consumer<Boolean> listener) Removes a previously added controller connection listener.
-
Method Details
-
getControllerClient
Get the controller client for listening to / querying statuses.- Returns:
- a
PersistentQueryControllerClient
-
getPersistentQueryClient
Get thePersistentQueryClientfor the specified query serial- Parameters:
serial- the query serial.- Returns:
- the
PersistentQueryControllerClientor null if the query does not exist, or is not running.
-
getIrisUserContext
Get theuser contextfor the currently authenticated user.- Returns:
- the user context
-
getServerConfiguration
Get the current controller configuration.- Returns:
- the current configuration
-
addControllerConnectionListener
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
Removes a previously added controller connection listener.- Parameters:
listener- the listener to remove
-
getQueryClient
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
-