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
  • An optional set of default BarrierScope to use in the event that these are not configured in any settings sources.

    In the case that no settings are found, and no default is available, then BarrierScope.all will be used. Therefore applying badly configured Barrier implementations to all Dispatchers

    Declaration

    Swift

    func defaultScopes() -> [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.