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 TypeMethodDescriptionvoid
addDisconnectHandler
(QueryProcessorConnection.DisconnectHandler disconnectListener) Add a new handler that knows what to do when this client becomes disconnected.<T> T
executeConcurrentQuery
(RemoteQuery<T> remoteQuery, Class<?>... additionalClasses) <T> T
executeQuery
(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) void
What 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.void
release()
Close the underlying connection.void
removeDisconnectHandler
(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:IPersistentQueryClient
Return a known table specified by its name from this persistent query client's data source.- Specified by:
getTable
in 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:IPersistentQueryClient
Close the underlying connection.- Specified by:
release
in 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:IPersistentQueryClient
What to do when this client becomes disconnected from its data source.- Specified by:
onDisconnect
in interfaceIPersistentQueryClient
- Specified by:
onDisconnect
in interfaceQueryProcessorConnection.DisconnectHandler
- See Also:
-
addDisconnectHandler
Description copied from interface:IPersistentQueryClient
Add a new handler that knows what to do when this client becomes disconnected.- Specified by:
addDisconnectHandler
in interfaceIPersistentQueryClient
- Parameters:
disconnectListener
- The listener for disconnect events.
-
removeDisconnectHandler
Description copied from interface:IPersistentQueryClient
Remove a known handler for disconnect events.- Specified by:
removeDisconnectHandler
in interfaceIPersistentQueryClient
- Parameters:
listenerToRemove
- The listener that should be removed.
-
onTestConnection
Description copied from interface:IPersistentQueryClient
Only used when we have a test client, in which case this provides a method to intercept the typical construction.- Specified by:
onTestConnection
in interfaceIPersistentQueryClient
-