Class OpcConnectionExtensionPoint<S>

java.lang.Object
com.inductiveautomation.ignition.gateway.config.AbstractExtensionPoint<S>
com.inductiveautomation.ignition.gateway.opc.OpcConnectionExtensionPoint<S>
Type Parameters:
S - the type of settings used by the OpcConnection provided by this extension point.
All Implemented Interfaces:
ExtensionPoint<S>, Comparable<ExtensionPoint<S>>

public abstract class OpcConnectionExtensionPoint<S> extends AbstractExtensionPoint<S>
Base class for ExtensionPoints that provide an OpcConnection implementation.
  • Field Details

    • RESOURCE_TYPE

      public static final ResourceType RESOURCE_TYPE
      The ResourceType used by all OPC Connections in the configuration resource collection.
  • Constructor Details

    • OpcConnectionExtensionPoint

      protected OpcConnectionExtensionPoint(String typeId, String nameKey, String descriptionKey, @Nullable Class<S> settingsType)
  • Method Details

    • settingsType

      public Optional<Class<S>> settingsType()
      Returns:
      the Class of the settings object for this ExtensionPoint, if it has one. If this ExtensionPoint does not have settings, return Optional.empty(). By default, this method returns the class of the object returned from ExtensionPoint.defaultSettings(), if one is provided.
    • resourceType

      public final ResourceType resourceType()
      Description copied from interface: ExtensionPoint
      The resource type shared by all types of this extension point. This is used to group extension points together. For example, all alarm journal types would share the same resource type, but have different typeIds.
    • create

      public final OpcConnection create(GatewayContext context, OpcSubscriptionModel model, String name, ExtensionPointConfig<OpcConnectionConfig, ?> config)
    • create

      public abstract OpcConnection create(GatewayContext context, OpcSubscriptionModel model, String name, OpcConnectionConfig profileConfig, S extensionConfig)
      Create a new OpcConnection of the type provided by this extension point.
      Parameters:
      context - the GatewayContext.
      model - the Gateway's OpcSubscriptionModel.
      profileConfig - configuration shared by all OPC connections.
      extensionConfig - configuration for the type of connection created by this extension point.
      Returns:
      a new OpcConnection instance.
    • onDelete

      public void onDelete(GatewayContext context, String name)
      Invoked once when a connection of this type is permanently deleted, after the connection's Lifecycle.shutdown() has run.

      This fires only on a genuine deletion of the connection's configuration resource — not on a disable, a reconfigure (delete-then-recreate of the same resource), a redundancy role-change restart, or gateway shutdown, all of which reuse the connection name and must keep durable per-connection state intact. An implementation can use it to reclaim durable per-connection state (for example, on-disk snapshots) keyed by name that must survive an ordinary restart but not the resource's deletion.

      The default implementation does nothing.

      Parameters:
      context - the GatewayContext.
      name - the name of the connection being deleted.
    • getTagExtensionProperties

      public Optional<Collection<Property<?>>> getTagExtensionProperties()
    • getTagGroupExtensionProperties

      public Optional<Collection<Property<?>>> getTagGroupExtensionProperties()
    • getSystemTagContributor

      public Optional<OpcConnectionSystemTagContributor> getSystemTagContributor()
      Returns the system tag contributor for this OPC connection type, if it publishes additional tags under the gateway's per-connection OPC system tag folder.
      Returns:
      the optional system tag contributor.