Package com.illumon.iris.controller
Interface IPersistentQueryClient
- All Superinterfaces:
QueryProcessorConnection.DisconnectHandler
- All Known Implementing Classes:
PersistentQueryClient
Defines a bare minimum set of functions that a persistent query client needs to be able to fulfil.
Mostly needed so that unit tests can simulate behaviors by a persistent query client.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDisconnectHandler
(QueryProcessorConnection.DisconnectHandler disconnectListener) Add a new handler that knows what to do when this client becomes disconnected.Return a known table specified by its name from this persistent query client's data source.void
What to do when this client becomes disconnected from its data source.void
release()
Close the underlying connection.void
removeDisconnectHandler
(QueryProcessorConnection.DisconnectHandler listenerToRemove) Remove a known handler for disconnect events.
-
Method Details
-
getTable
Return a known table specified by its name from this persistent query client's data source.- Parameters:
tableName
- The name of the table to return.- Returns:
- A table by the specified name.
-
onDisconnect
void onDisconnect()What to do when this client becomes disconnected from its data source.- Specified by:
onDisconnect
in interfaceQueryProcessorConnection.DisconnectHandler
- See Also:
-
addDisconnectHandler
Add a new handler that knows what to do when this client becomes disconnected.- Parameters:
disconnectListener
- The listener for disconnect events.
-
removeDisconnectHandler
Remove a known handler for disconnect events.- Parameters:
listenerToRemove
- The listener that should be removed.
-
release
void release()Close the underlying connection.
-