Class GatewayContextDecorator
java.lang.Object
com.inductiveautomation.ignition.gateway.model.GatewayContextDecorator
- All Implemented Interfaces:
ExecutionManagerFactory
,CommonContext
,GatewayContext
Simple abstract decorator for
GatewayContext
-
Field Summary
Fields inherited from interface com.inductiveautomation.ignition.gateway.model.GatewayContext
SERVLET_CONTEXT_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDataSource
(Properties connectionProps) Will create a javax.sql.DataSource that uses connection pooling through apache's DBCP2Returns an instance of the XMLDeserializer that can be used to deserialize project resources.createExecutionManager
(String name, int threadCount) Creates a new, private execution engine.createExecutionManager
(String name, int threadCount, ThreadFactory factory) The alarm manager is the central hub for alarming.Returns a list of currently available Edge editions (either licensed or in trial).com.google.common.eventbus.EventBus
This is a generic event bus that can be used by any part of Ignition within a single scope (jvm)Returns the shared execution manager for the gateway.Returns the core function factory used by expressions.com.codahale.metrics.health.HealthCheckRegistry
Returns a UUID that is generated fresh every time the context starts up.getLicenseState
(String moduleId) Returns the license state for the given moduleReturns an interface to the persistence system that bypasses redundancy, and goes directly to the internal database.The MessageDispatchManager is used to send script messages to message handlers running on clients and the Gateway.Returns the MetricHistoryManager, which allows system metric history to be stored for a limited amount of time.com.codahale.metrics.MetricRegistry
Returns the Gateway MetricRegistry, where various metrics like meters and gauges can be accessed.Returns the hook class for another module, used for modules that deal with each other's models.Returns theModuleServicesManager
, which is responsible for managing the lifecycle of ModuleServices and ModuleServiceConsumers.Returns the appropriate named query rpc for the context.TheNativeLibraryManager
can be used to load gateway-scoped native libraries on a ClassLoader that is reachable by all modules.Returns an interface to the internal database persistence system.Get the manager that holds all of the defined schedules.Returns the ScriptManager that can be used to execute Python scripts.getState()
May return a string describing why the context is in its current stateReturns theStoreAndForwardManager
that can be used for storing data to some store and forward engine.The modern way to look up and set gateway system properties.Returns the manager that provides access to Ignition's tag system.This manager holds all the configured user sources in the system.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.gateway.model.GatewayContext
getDiagnosticsManager
-
Constructor Details
-
GatewayContextDecorator
-
-
Method Details
-
getDatasourceManager
- Specified by:
getDatasourceManager
in interfaceGatewayContext
-
getUserSourceManager
Description copied from interface:GatewayContext
This manager holds all the configured user sources in the system. User sources are used for authentication and managing users' contact info, schedules, etc.- Specified by:
getUserSourceManager
in interfaceGatewayContext
-
getSecurityZoneManager
- Specified by:
getSecurityZoneManager
in interfaceGatewayContext
-
getScheduleManager
Description copied from interface:GatewayContext
Get the manager that holds all of the defined schedules. Schedules are used in alarm notification.- Specified by:
getScheduleManager
in interfaceGatewayContext
-
getAuditManager
- Specified by:
getAuditManager
in interfaceGatewayContext
-
getAlarmManager
Description copied from interface:GatewayContext
The alarm manager is the central hub for alarming. It is generally used for querying, both status and historical, but can also be used to register new alarm events, and subscribe to alarm events.- Specified by:
getAlarmManager
in interfaceGatewayContext
-
getInstanceToken
Description copied from interface:GatewayContext
Returns a UUID that is generated fresh every time the context starts up.- Specified by:
getInstanceToken
in interfaceGatewayContext
-
getLocalDBInterface
- Specified by:
getLocalDBInterface
in interfaceGatewayContext
-
getPersistenceInterface
Description copied from interface:GatewayContext
Returns an interface to the internal database persistence system. This version of the function (as compared to getLocalPersistenceInterface()) handles additional tasks, such as replicating data to the redundant backup, and is the version that should be used for most tasks.- Specified by:
getPersistenceInterface
in interfaceGatewayContext
-
getLocalPersistenceInterface
Description copied from interface:GatewayContext
Returns an interface to the persistence system that bypasses redundancy, and goes directly to the internal database. In general, this should NOT be used. Instead, most module authors will want to use getPersistenceInterface(). This- Specified by:
getLocalPersistenceInterface
in interfaceGatewayContext
-
createDataSource
Description copied from interface:GatewayContext
Will create a javax.sql.DataSource that uses connection pooling through apache's DBCP2- Specified by:
createDataSource
in interfaceGatewayContext
- Throws:
Exception
-
getSchemaUpdater
- Specified by:
getSchemaUpdater
in interfaceGatewayContext
-
getExecutionManager
Description copied from interface:GatewayContext
Returns the shared execution manager for the gateway. Only schedule tasks in here that will not block, which could cause thread starvation.- Specified by:
getExecutionManager
in interfaceGatewayContext
-
getExecutorService
- Specified by:
getExecutorService
in interfaceGatewayContext
-
getScheduledExecutorService
- Specified by:
getScheduledExecutorService
in interfaceGatewayContext
-
getRedundancyManager
- Specified by:
getRedundancyManager
in interfaceGatewayContext
-
getGatewaySessionManager
- Specified by:
getGatewaySessionManager
in interfaceGatewayContext
-
getModuleServicesManager
Description copied from interface:GatewayContext
Returns theModuleServicesManager
, which is responsible for managing the lifecycle of ModuleServices and ModuleServiceConsumers. This system is used to allow modules to provide services to other modules. The typical pattern is that a dependant module will know about an interface that it wants to use, and it will request that interface from the ModuleServicesManager. The ModuleServicesManager will then notify the dependant module when the service is available.- Specified by:
getModuleServicesManager
in interfaceGatewayContext
-
getApiTokenManager
- Specified by:
getApiTokenManager
in interfaceGatewayContext
-
getOpcManager
- Specified by:
getOpcManager
in interfaceGatewayContext
-
getTagHistoryManager
- Specified by:
getTagHistoryManager
in interfaceGatewayContext
-
getStoreAndForwardManager
Description copied from interface:GatewayContext
Returns theStoreAndForwardManager
that can be used for storing data to some store and forward engine. This manager is also useful for registering different engines, sinks, and stores as well as data serializers.- Specified by:
getStoreAndForwardManager
in interfaceGatewayContext
- Returns:
- The
StoreAndForwardManager
.
-
getEmailProfileManager
- Specified by:
getEmailProfileManager
in interfaceGatewayContext
-
getImageManager
- Specified by:
getImageManager
in interfaceGatewayContext
-
getNamedQueryManager
Description copied from interface:GatewayContext
Returns the appropriate named query rpc for the context. In the gateway and client, we only want to use named queries that have been saved. In the designer, we want to use the current version so that reports and bindings can be seen and used for testing before the project is saved.- Specified by:
getNamedQueryManager
in interfaceGatewayContext
- Returns:
- The correct NamedQueryManager implementation for the scope.
-
getState
- Specified by:
getState
in interfaceGatewayContext
-
getStateMessage
Description copied from interface:GatewayContext
May return a string describing why the context is in its current state- Specified by:
getStateMessage
in interfaceGatewayContext
-
getProjectManager
- Specified by:
getProjectManager
in interfaceGatewayContext
-
getModuleManager
- Specified by:
getModuleManager
in interfaceGatewayContext
-
getConfigurationManager
- Specified by:
getConfigurationManager
in interfaceGatewayContext
-
getLicenseManager
- Specified by:
getLicenseManager
in interfaceGatewayContext
-
getPerformanceMonitor
- Specified by:
getPerformanceMonitor
in interfaceGatewayContext
-
getProgressManager
- Specified by:
getProgressManager
in interfaceGatewayContext
-
getNativeLibraryManager
Description copied from interface:GatewayContext
TheNativeLibraryManager
can be used to load gateway-scoped native libraries on a ClassLoader that is reachable by all modules.- Specified by:
getNativeLibraryManager
in interfaceGatewayContext
- Returns:
- The
NativeLibraryManager
.
-
getMessageDispatchManager
Description copied from interface:GatewayContext
The MessageDispatchManager is used to send script messages to message handlers running on clients and the Gateway.- Specified by:
getMessageDispatchManager
in interfaceGatewayContext
-
getGatewayNetworkManager
- Specified by:
getGatewayNetworkManager
in interfaceGatewayContext
-
getLoggingManager
- Specified by:
getLoggingManager
in interfaceCommonContext
- Specified by:
getLoggingManager
in interfaceGatewayContext
-
getMetricRegistry
public com.codahale.metrics.MetricRegistry getMetricRegistry()Description copied from interface:GatewayContext
Returns the Gateway MetricRegistry, where various metrics like meters and gauges can be accessed. *NOTE* if you have registered a metric in MetricHistoryManager, do not delete it directly from MetricRegistry! Use MetricHistoryManager.unregister() instead.- Specified by:
getMetricRegistry
in interfaceGatewayContext
-
getHealthCheckRegistry
public com.codahale.metrics.health.HealthCheckRegistry getHealthCheckRegistry()- Specified by:
getHealthCheckRegistry
in interfaceGatewayContext
-
getMetricHistoryManager
Description copied from interface:GatewayContext
Returns the MetricHistoryManager, which allows system metric history to be stored for a limited amount of time.- Specified by:
getMetricHistoryManager
in interfaceGatewayContext
-
getScriptManager
Description copied from interface:CommonContext
Returns the ScriptManager that can be used to execute Python scripts.- Specified by:
getScriptManager
in interfaceCommonContext
-
createDeserializer
Description copied from interface:CommonContext
Returns an instance of the XMLDeserializer that can be used to deserialize project resources. Note that this is the only safe way to obtain an instance of XMLDeserializer, because the context will pass the new deserializer around to all loaded modules, giving them a chance to initialize any custom deserialization deletes on it first.- Specified by:
createDeserializer
in interfaceCommonContext
-
getExpressionFunctionFactory
Description copied from interface:CommonContext
Returns the core function factory used by expressions. Includes extension functions registered by modules.- Specified by:
getExpressionFunctionFactory
in interfaceCommonContext
-
getModule
Description copied from interface:CommonContext
Returns the hook class for another module, used for modules that deal with each other's models. Example: The Reporting module's Designer hook uses this to get the Vision module's hook, in order to add components to the Vision module's palette.Note that the type of object you get back from this method is very scope specific. In the Gateway, you'll get a GatewayModuleHook, in the Designer you'll get a DesignerModuleHook, etc.
- Specified by:
getModule
in interfaceCommonContext
- Specified by:
getModule
in interfaceGatewayContext
- Parameters:
id
- The module ID of the module you want to get the hook for.- Returns:
- The hook class for the given module, or null if the module is not installed or not present in the given scope.
-
getLicenseState
Description copied from interface:CommonContext
Returns the license state for the given module- Specified by:
getLicenseState
in interfaceCommonContext
-
getEventBus
public com.google.common.eventbus.EventBus getEventBus()Description copied from interface:CommonContext
This is a generic event bus that can be used by any part of Ignition within a single scope (jvm)- Specified by:
getEventBus
in interfaceCommonContext
-
createExecutionManager
Description copied from interface:ExecutionManagerFactory
Creates a new, private execution engine. Use this if you have tasks that may block waiting for other things to complete, so that you don't clog up the shared execution engine.- Specified by:
createExecutionManager
in interfaceExecutionManagerFactory
-
createExecutionManager
- Specified by:
createExecutionManager
in interfaceExecutionManagerFactory
-
getTagManager
Description copied from interface:CommonContext
Returns the manager that provides access to Ignition's tag system.- Specified by:
getTagManager
in interfaceCommonContext
- Specified by:
getTagManager
in interfaceGatewayContext
-
getSystemManager
- Specified by:
getSystemManager
in interfaceGatewayContext
-
getWebResourceManager
- Specified by:
getWebResourceManager
in interfaceGatewayContext
-
getSecurityLevelManager
- Specified by:
getSecurityLevelManager
in interfaceGatewayContext
- Returns:
- the
SecurityLevelManager
-
getSyncManager
- Specified by:
getSyncManager
in interfaceGatewayContext
- Returns:
- the
SyncManager
that handles syncing data between two systems.
-
getEdgeEditions
Description copied from interface:CommonContext
Returns a list of currently available Edge editions (either licensed or in trial). Does not check if any required modules are installed and running.- Specified by:
getEdgeEditions
in interfaceCommonContext
-
getTelemetryManager
- Specified by:
getTelemetryManager
in interfaceGatewayContext
- Returns:
- the TelemetryManager used to gather statistics about the os, vm, and Ignition configuration.
-
getMetricsDashboardsManager
- Specified by:
getMetricsDashboardsManager
in interfaceGatewayContext
-
getSystemPropertiesManager
Description copied from interface:GatewayContext
The modern way to look up and set gateway system properties. This method replaces getSystemProperties(), which had a dangerous dependency on a global ORM record holding gateway system properties.Available gateway system properties are listed in the GatewaySystemProperties object. Use one of the Properties in that class to get and set gateway system properties.
- Specified by:
getSystemPropertiesManager
in interfaceGatewayContext
- Returns:
- the SystemPropertiesManager that can be used to get and set gateway system properties safely.
-
getSystemEncryptionService
- Specified by:
getSystemEncryptionService
in interfaceGatewayContext
-
getSecretProviderManager
- Specified by:
getSecretProviderManager
in interfaceGatewayContext
-
getRestartTasksManager
- Specified by:
getRestartTasksManager
in interfaceGatewayContext
-
getEntityManager
- Specified by:
getEntityManager
in interfaceGatewayContext
- Returns:
- The Gateway-wide, shared
EntityManager
, which is used to register diagnostic entities. An entity is an abstraction that can be used to represent a configuration and/or diagnostic object in a generic way.
-
getServiceConnectorManager
- Specified by:
getServiceConnectorManager
in interfaceGatewayContext
-