Class QueryManager
java.lang.Object
com.inductiveautomation.factorypmi.application.gateway.QueryManager
- All Implemented Interfaces:
GatewayConstants
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.common.gateway.GatewayConstants
GatewayConstants.ClientAuthChallengeDeserializer -
Field Summary
Fields inherited from interface com.inductiveautomation.ignition.common.gateway.GatewayConstants
BUILD_NUMBER, CONNECT_TIMEOUT, ERRNO_BROWSE_ERROR, ERRNO_COMM_ERROR, ERRNO_CONNECTION_MODE, ERRNO_DBCONNECTION_SQL, ERRNO_INTERNAL, ERRNO_INVALIDARGS, ERRNO_INVOCATION_EXCEPTION, ERRNO_LICENSE_RESTRICTED, ERRNO_LOGIN_CANCELLED, ERRNO_LOGIN_FAILED, ERRNO_LOGIN_FAILED_LICENSING, ERRNO_NO_SESSION, ERRNO_NON_ACTIVE_NODE, ERRNO_NON_MASTER_NODE, ERRNO_NOT_AUTHORIZED, ERRNO_OK, ERRNO_PARSE, ERRNO_PASSWORD_EXPIRED, ERRNO_SQL, ERRNO_TRIAL_EXPIRED, ERRNO_VERSION_INCOMPATIBILITY, ERROR_MESSAGE_TYPE, FUNCTION_NAME, GSON, LOCALE_LIST, MODE_DISCONNECTED, MODE_FULL, MODE_READ_ONLY, MODULE_ID, MTYPE_PUBLIC_PING, OPC_BROWSE_TIMEOUT, PACKAGE_ID, PROJECT_NAME, REMOTE_HOST, SCOPE_HEADER, SESSION_ID_HEADER, SOCKET_TIMEOUT, TIMEZONE_ID, WARNING_MESSAGE_TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateInstance(int numWorkers, int numUpdaters) intstatic QueryManagerintvoidregisterQuery(IQuery query, IQueryResponseListener listener, Class targetType, int updateRate, boolean runOnce, boolean notifyLoading) Registers a new query to be run, either periodically or once.voidrunUpdateQuery(IQueryResponseListener adapter, IQuery query) voidrunUpdateQuery(IQueryResponseListener adapter, String query, String datasource) voidsetPaused(boolean paused) voidstop()voidunregisterQuery(Object key)
-
Method Details
-
getInstance
-
createInstance
public static void createInstance(int numWorkers, int numUpdaters) -
stop
public void stop() -
getActiveThreads
public int getActiveThreads() -
getQueryCount
public int getQueryCount() -
printReport
public void printReport() -
runUpdateQuery
-
runUpdateQuery
-
registerQuery
public Object registerQuery(IQuery query, IQueryResponseListener listener, Class targetType, int updateRate, boolean runOnce, boolean notifyLoading) Registers a new query to be run, either periodically or once. This "query" is an implementation of IQuery - anything that can retrieve a Dataset from the gateway.- Parameters:
targetType- The data type that will be pushed into the query response listener. Use Dataset.class to leave the IQuery's resulting dataset untouched. Use a scalar type to coerce the 1st value.updateRate- The rate (actually a delay) at which to run the query.runOnce- If true, the query will only be run once, regardless of the update ratenotifyLoading- Controls whether or not the response listener will be notified when this query is running.
-
unregisterQuery
-
setPaused
public void setPaused(boolean paused)
-