Interface GatewayContext

All Superinterfaces:
CommonContext, ExecutionManagerFactory
All Known Implementing Classes:
GatewayContextDecorator

public interface GatewayContext extends CommonContext, ExecutionManagerFactory
  • Field Details

    • SERVLET_CONTEXT_KEY

      static final 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 Details

    • 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

      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

      DataSource createDataSource(Properties connectionProps) throws Exception
      Will create a javax.sql.DataSource that uses connection pooling through apache's DBCP2
      Throws:
      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

      ExecutorService getExecutorService()
    • getScheduledExecutorService

      ScheduledExecutorService getScheduledExecutorService()
    • getRedundancyManager

      RedundancyManager getRedundancyManager()
    • getGatewaySessionManager

      GatewaySessionManager getGatewaySessionManager()
    • getModuleServicesManager

      ModuleServicesManager getModuleServicesManager()
    • getSystemProperties

      @Deprecated SystemPropertiesRecord getSystemProperties()
      Deprecated.
      Use getSystemPropertiesManager() to access gateway system properties. 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);
       
    • getSystemPropertiesManager

      SystemPropertiesManager getSystemPropertiesManager()
      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.
      Returns:
      the SystemPropertiesManager that can be used to get and set gateway system properties safely.
    • getEdgeSystemProperties

      @Deprecated EdgeSystemPropertiesRecord getEdgeSystemProperties()
      Deprecated.
      Use getSystemPropertiesManager() to access edge gateway system properties. Convenience function to look up the EdgeSystemPropertiesRecord. 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(EdgeSystemPropertiesRecord.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 interface CommonContext
    • getTagHistoryManager

      GatewayTagHistoryManager getTagHistoryManager()
    • getHistoryManager

      HistoryManager getHistoryManager()
    • getSmtpManager

      @Deprecated SmtpManager getSmtpManager()
      Deprecated.
      Deprecated. Use getEmailProfileManager().
    • getEmailProfileManager

      EmailProfileManager getEmailProfileManager()
    • 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

      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()
      The NativeLibraryManager 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 interface CommonContext
    • 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

      Optional<WebAuthStrategyAdapter> getWebAuthStrategyAdapter(@Nonnull String type)
      Get the WebAuthStrategyAdapter registered with the given type
      Parameters:
      type - the registered adapter type string
      Returns:
      An Optional containing the WebAuthStrategyAdapter registered with the given type or an empty Optional if there exists no adapter registered with the given type
    • getSyncManager

      SyncManager getSyncManager()
      Returns:
      the SyncManager that handles syncing data between two systems.
      Since:
      8.0.5
    • getTelemetryManager

      default TelemetryManager getTelemetryManager()
      Returns:
      the TelemetryManager used to gather statistics about the os, vm, and Ignition configuration.
    • getDiagnosticsManager

      default DiagnosticsManager getDiagnosticsManager()
      Returns:
      DiagnosticManager which is capable of providing a diagnostic bundle file
    • getMetricsDashboardsManager

      MetricsDashboardsManager getMetricsDashboardsManager()