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 Type Method Description void
addControllerConnectionListener(Consumer<Boolean> listener)
Listen for events when the controller client connection status changes.PersistentQueryControllerClient
getControllerClient()
Get the controller client for listening to / querying statuses.IrisUserContext
getIrisUserContext()
Get theuser context
for the currently authenticated user.PersistentQueryClient
getPersistentQueryClient(long serial)
Get thePersistentQueryClient
for the specified query serialPersistentQueryClient
getQueryClient(String queryType)
Get a client for the specified query type.PersistentQueryControllerConfiguration
getServerConfiguration()
Get the current controller configuration.void
removeControllerConnectionListener(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 thePersistentQueryClient
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
Get theuser context
for 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
-