Interface GatewayContext
-
- All Superinterfaces:
CommonContext
,ExecutionManagerFactory
- All Known Implementing Classes:
GatewayContextDecorator
public interface GatewayContext extends CommonContext, ExecutionManagerFactory
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SERVLET_CONTEXT_KEY
The string key where the instance of GatewayContext is stored under the servlet context object object.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.sql.DataSource
createDataSource(java.util.Properties connectionProps)
Will create a javax.sql.DataSource that uses connection pooling through apache's DBCP2AlarmManager
getAlarmManager()
The alarm manager is the central hub for alarming.AuditManager
getAuditManager()
DatasourceManager
getDatasourceManager()
ExecutionManager
getExecutionManager()
Returns the shared execution manager for the gateway.java.util.concurrent.ExecutorService
getExecutorService()
GatewayNetworkManager
getGatewayAreaNetworkManager()
GatewaySessionManager
getGatewaySessionManager()
HistoryManager
getHistoryManager()
HttpClientManager
getHttpClientManager()
IdpAdapterManager
getIdpAdapterManager()
ImageManager
getImageManager()
java.util.UUID
getInstanceToken()
Returns a UUID that is generated fresh every time the context starts up.LaunchManager
getLaunchManager()
LicenseManager
getLicenseManager()
DBInterface
getLocalDBInterface()
PersistenceInterface
getLocalPersistenceInterface()
Returns an interface to the persistence system that bypasses redundancy, and goes directly to the internal database.GatewayLoggingManager
getLoggingManager()
MessageDispatchManager
getMessageDispatchManager()
The MessageDispatchManager is used to send script messages to message handlers running on clients and the Gateway.MetricHistoryManager
getMetricHistoryManager()
Returns the MetricHistoryManager, which allows system metric history to be stored for a limited amount of time.com.codahale.metrics.MetricRegistry
getMetricRegistry()
Returns the Gateway MetricRegistry, where various metrics like meters and gauges can be accessed.ModuleManager
getModuleManager()
ModuleServicesManager
getModuleServicesManager()
NamedQueryManager
getNamedQueryManager()
Returns the appropriate named query rpc for the context.NativeLibraryManager
getNativeLibraryManager()
TheNativeLibraryManager
can be used to load gateway-scoped native libraries on a ClassLoader that is reachable by all modules.OpcConnectionManager
getOpcManager()
PerformanceMonitor
getPerformanceMonitor()
PersistenceInterface
getPersistenceInterface()
Returns an interface to the internal database persistence system.GatewayProgressManager
getProgressManager()
ProjectManager
getProjectManager()
RedundancyManager
getRedundancyManager()
java.util.concurrent.ScheduledExecutorService
getScheduledExecutorService()
ScheduleManager
getScheduleManager()
Get the manager that holds all of the defined schedules.SchemaUpdater
getSchemaUpdater()
SecurityLevelManager
getSecurityLevelManager()
SecurityZoneManager
getSecurityZoneManager()
SmtpManager
getSmtpManager()
ContextState
getState()
java.lang.String
getStateMessage()
May return a string describing why the context is in its current stateSystemManager
getSystemManager()
SystemPropertiesRecord
getSystemProperties()
Convenience function to look up the SystemPropertiesRecord.GatewayTagHistoryManager
getTagHistoryManager()
GatewayTagManager
getTagManager()
Returns the manager that provides access to Ignition's tag system.TaskManager
getTaskManager()
UserSourceManager
getUserSourceManager()
This manager holds all of the configured user sources in the system.java.util.Optional<WebAuthStrategyAdapter>
getWebAuthStrategyAdapter(java.lang.String type)
Get theWebAuthStrategyAdapter
registered with the given typeWebResourceManager
getWebResourceManager()
-
Methods inherited from interface com.inductiveautomation.ignition.common.model.CommonContext
createDeserializer, getEventBus, getExpressionFunctionFactory, getLicenseState, getModule, getScriptManager
-
Methods inherited from interface com.inductiveautomation.ignition.common.ExecutionManagerFactory
createExecutionManager, createExecutionManager
-
-
-
-
Field Detail
-
SERVLET_CONTEXT_KEY
static final java.lang.String SERVLET_CONTEXT_KEY
The string key where the instance of GatewayContext is stored under the servlet context object object. Servlets can grab the GatewayContext like so:GatewayContext context = (GatewayContext) getServletContext().getAttribute(GatewayContext.SERVLET_CONTEXT_KEY);
-
-
Method Detail
-
getDatasourceManager
DatasourceManager getDatasourceManager()
-
getUserSourceManager
UserSourceManager getUserSourceManager()
This manager holds all of the configured user sources in the system. User sources are used for authentication and managing users' contact info, schedules, etc.
-
getSecurityZoneManager
SecurityZoneManager getSecurityZoneManager()
-
getScheduleManager
ScheduleManager getScheduleManager()
Get the manager that holds all of the defined schedules. Schedules are used in alarm notification.
-
getAuditManager
AuditManager getAuditManager()
-
getAlarmManager
AlarmManager getAlarmManager()
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.
-
getInstanceToken
java.util.UUID getInstanceToken()
Returns a UUID that is generated fresh every time the context starts up.
-
getLocalDBInterface
DBInterface getLocalDBInterface()
-
getPersistenceInterface
PersistenceInterface getPersistenceInterface()
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.
-
getLocalPersistenceInterface
PersistenceInterface getLocalPersistenceInterface()
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
-
createDataSource
javax.sql.DataSource createDataSource(java.util.Properties connectionProps) throws java.lang.Exception
Will create a javax.sql.DataSource that uses connection pooling through apache's DBCP2- Throws:
java.lang.Exception
-
getSchemaUpdater
SchemaUpdater getSchemaUpdater()
-
getExecutionManager
ExecutionManager getExecutionManager()
Returns the shared execution manager for the gateway. Only schedule tasks in here that will not block, which could cause thread starvation.
-
getExecutorService
java.util.concurrent.ExecutorService getExecutorService()
-
getScheduledExecutorService
java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
-
getRedundancyManager
RedundancyManager getRedundancyManager()
-
getGatewaySessionManager
GatewaySessionManager getGatewaySessionManager()
-
getModuleServicesManager
ModuleServicesManager getModuleServicesManager()
-
getSystemProperties
SystemPropertiesRecord getSystemProperties()
Convenience function to look up the SystemPropertiesRecord. Make sure not to call this if you already have a session open, because you can't open 2 sessions in the same thread. Instead, just use:session.find(SystemPropertiesRecord.META, SQueryMode.SBASIC, 0L);
-
getOpcManager
OpcConnectionManager getOpcManager()
-
getTagManager
GatewayTagManager getTagManager()
Description copied from interface:CommonContext
Returns the manager that provides access to Ignition's tag system.- Specified by:
getTagManager
in interfaceCommonContext
-
getTagHistoryManager
GatewayTagHistoryManager getTagHistoryManager()
-
getHistoryManager
HistoryManager getHistoryManager()
-
getSmtpManager
SmtpManager getSmtpManager()
-
getImageManager
ImageManager getImageManager()
-
getNamedQueryManager
NamedQueryManager getNamedQueryManager()
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.- Returns:
- The correct NamedQueryManager implementation for the scope.
- Since:
- 7.9.3
-
getState
ContextState getState()
-
getStateMessage
java.lang.String getStateMessage()
May return a string describing why the context is in its current state
-
getProjectManager
ProjectManager getProjectManager()
-
getSystemManager
SystemManager getSystemManager()
-
getModuleManager
ModuleManager getModuleManager()
-
getLicenseManager
LicenseManager getLicenseManager()
-
getLaunchManager
LaunchManager getLaunchManager()
-
getPerformanceMonitor
PerformanceMonitor getPerformanceMonitor()
-
getProgressManager
GatewayProgressManager getProgressManager()
-
getWebResourceManager
WebResourceManager getWebResourceManager()
-
getNativeLibraryManager
NativeLibraryManager getNativeLibraryManager()
TheNativeLibraryManager
can be used to load gateway-scoped native libraries on a ClassLoader that is reachable by all modules.- Returns:
- The
NativeLibraryManager
. - Since:
- Ignition 7.3.3
-
getMessageDispatchManager
MessageDispatchManager getMessageDispatchManager()
The MessageDispatchManager is used to send script messages to message handlers running on clients and the Gateway.
-
getGatewayAreaNetworkManager
GatewayNetworkManager getGatewayAreaNetworkManager()
-
getTaskManager
TaskManager getTaskManager()
-
getLoggingManager
GatewayLoggingManager getLoggingManager()
- Specified by:
getLoggingManager
in interfaceCommonContext
-
getMetricRegistry
com.codahale.metrics.MetricRegistry getMetricRegistry()
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.
-
getMetricHistoryManager
MetricHistoryManager getMetricHistoryManager()
Returns the MetricHistoryManager, which allows system metric history to be stored for a limited amount of time.
-
getHttpClientManager
HttpClientManager getHttpClientManager()
- Returns:
- the
HttpClientManager
-
getSecurityLevelManager
SecurityLevelManager getSecurityLevelManager()
- Returns:
- the
SecurityLevelManager
-
getIdpAdapterManager
IdpAdapterManager getIdpAdapterManager()
- Returns:
- the
IdpAdapterManager
-
getWebAuthStrategyAdapter
java.util.Optional<WebAuthStrategyAdapter> getWebAuthStrategyAdapter(@Nonnull java.lang.String type)
Get theWebAuthStrategyAdapter
registered with the given type- Parameters:
type
- the registered adapter type string- Returns:
- An
Optional
containing theWebAuthStrategyAdapter
registered with the given type or an empty Optional if there exists no adapter registered with the given type
-
-