BarrierFactory

public protocol BarrierFactory<BarrierType>

The [BarrierFactory] is responsible for creating new [ConfigurableBarrier] instances.

  • The specific ConfigurableBarrier that this factory can create.

    Declaration

    Swift

    associatedtype BarrierType : ConfigurableBarrier
  • defaultScope() Default implementation

    The default BarrierScope to use when no scope is provided by any settings source.

    Note

    The protocol extension returns .all if not overridden, which applies the barrier to all dispatchers. Override this when a narrower default scope is appropriate for your Barrier implementation.

    Default Implementation

    Declaration

    Swift

    func defaultScope() -> BarrierScope
  • Creates a ConfigurableBarrier instance using the given context and configuration.

    Declaration

    Swift

    func create(context: TealiumContext, configuration: DataObject) -> BarrierType
  • getEnforcedSettings() Default implementation

    Returns some optional settings for this barrier that override any other Local or Remote settings fields.

    Only the values at the specific keys returned in this Dictionary will be enforced and remain constant during the life of this Barrier. Other values at other keys that are not present in this Dictionary can be set by Local or Remote settings and be updated by future Remote settings refreshes during the life of this Barrier.

    Default Implementation

    Declaration

    Swift

    func getEnforcedSettings() -> DataObject

    Return Value

    A DataObject representing the BarrierSettings, containing some of the settings used by the Barrier that will be enforced and remain constant during the life of this Barrier.