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 TypeMethodDescriptionvoidaddDisconnectHandler(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.voidWhat to do when this client becomes disconnected from its data source.Only used when we have a test client, in which case this provides a method to intercept the typical construction.voidrelease()Close the underlying connection.voidremoveDisconnectHandler(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:
onDisconnectin 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. -
onTestConnection
Only used when we have a test client, in which case this provides a method to intercept the typical construction.
-