Class DecodedResourceImpl<R>

java.lang.Object
com.inductiveautomation.ignition.gateway.config.DecodedResourceImpl<R>
All Implemented Interfaces:
DecodedResource<R>

public class DecodedResourceImpl<R> extends Object implements DecodedResource<R>
  • Constructor Details

    • DecodedResourceImpl

      public DecodedResourceImpl(Resource resource, R config)
      Creates a DecodedResource with no backup config.
    • DecodedResourceImpl

      public DecodedResourceImpl(Resource resource, R config, @Nullable R backupConfig)
      Creates a DecodedResource instance.
      Parameters:
      resource - The resource that was decoded. (required)
      config - The configuration object that was deserialized from config.json (required)
      backupConfig - The alternate configuration object deserialized from backupConfig.json, if any. (optional)
  • Method Details

    • resource

      public Resource resource()
      Specified by:
      resource in interface DecodedResource<R>
      Returns:
      direct access to the Resource itself. This is useful because the Resource contains the name, enabled bit, description, and any other data files that may be associated with the resource.
    • config

      public R config()
      Specified by:
      config in interface DecodedResource<R>
      Returns:
      the decoded configuration object, which is the result of deserializing the resource's config.json data file.
    • backupConfig

      public Optional<R> backupConfig()
      Description copied from interface: DecodedResource
      An optional alternate copy of the config object, to be used if the gateway's redundancy NodeRole = Backup
      Specified by:
      backupConfig in interface DecodedResource<R>