Package com.illumon.iris.controller
Class PersistentQueryClient
java.lang.Object
com.illumon.iris.controller.PersistentQueryClient
- All Implemented Interfaces:
IPersistentQueryClient,QueryProcessorConnection.DisconnectHandler
Note:: {PersistentQueryConfiguration, PersistentQueryState, PersistentQueryInfo, PersistentQuery, PersistentQueryClient} replace TableConfiguration.
-
Constructor Summary
ConstructorsConstructorDescriptionPersistentQueryClient(PersistentQueryInfo queryInfo, com.fishlib.io.logger.Logger log) PersistentQueryClient(PersistentQueryInfo queryInfo, com.fishlib.io.logger.Logger log, QueryProcessorConnection.DisconnectHandler disconnectHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDisconnectHandler(QueryProcessorConnection.DisconnectHandler disconnectListener) Add a new handler that knows what to do when this client becomes disconnected.<T> TexecuteConcurrentQuery(RemoteQuery<T> remoteQuery, Class<?>... additionalClasses) <T> TexecuteQuery(RemoteQuery<T> remoteQuery, Class<?>... additionalClasses) getDbTable(String tableName) Deprecated.getDbTableViewport(String tableName) Return a known table specified by its name from this persistent query client's data source.getTableMap(String tableMapName) getTableViewport(String tableName) 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.
-
Constructor Details
-
PersistentQueryClient
-
PersistentQueryClient
public PersistentQueryClient(PersistentQueryInfo queryInfo, com.fishlib.io.logger.Logger log, @Nullable QueryProcessorConnection.DisconnectHandler disconnectHandler)
-
-
Method Details
-
getTable
Description copied from interface:IPersistentQueryClientReturn a known table specified by its name from this persistent query client's data source.- Specified by:
getTablein interfaceIPersistentQueryClient- Parameters:
tableName- The name of the table to return.- Returns:
- A table by the specified name.
-
getTableViewport
-
getWidget
-
getTableMap
-
getDbTable
Deprecated. -
getDbTableViewport
-
release
public void release()Description copied from interface:IPersistentQueryClientClose the underlying connection.- Specified by:
releasein interfaceIPersistentQueryClient
-
getRemoteDatabase
-
executeQuery
public <T> T executeQuery(RemoteQuery<T> remoteQuery, Class<?>... additionalClasses) throws IOException - Throws:
IOException
-
executeConcurrentQuery
public <T> T executeConcurrentQuery(RemoteQuery<T> remoteQuery, Class<?>... additionalClasses) throws Exception - Throws:
Exception
-
onDisconnect
public void onDisconnect()Description copied from interface:IPersistentQueryClientWhat to do when this client becomes disconnected from its data source.- Specified by:
onDisconnectin interfaceIPersistentQueryClient- Specified by:
onDisconnectin interfaceQueryProcessorConnection.DisconnectHandler- See Also:
-
addDisconnectHandler
Description copied from interface:IPersistentQueryClientAdd a new handler that knows what to do when this client becomes disconnected.- Specified by:
addDisconnectHandlerin interfaceIPersistentQueryClient- Parameters:
disconnectListener- The listener for disconnect events.
-
removeDisconnectHandler
Description copied from interface:IPersistentQueryClientRemove a known handler for disconnect events.- Specified by:
removeDisconnectHandlerin interfaceIPersistentQueryClient- Parameters:
listenerToRemove- The listener that should be removed.
-
onTestConnection
Description copied from interface:IPersistentQueryClientOnly used when we have a test client, in which case this provides a method to intercept the typical construction.- Specified by:
onTestConnectionin interfaceIPersistentQueryClient
-