Class AbstractConfigFileProcessor

java.lang.Object
org.opendaylight.bgpcep.config.loader.spi.AbstractConfigFileProcessor
All Implemented Interfaces:
AutoCloseable, ConfigFileProcessor, org.opendaylight.yangtools.concepts.Registration
Direct Known Subclasses:
BmpMonitorConfigFileProcessor, NetworkTopologyConfigFileProcessor, OpenconfigRoutingConfigFileProcessor, ProtocolsConfigFileProcessor

public abstract class AbstractConfigFileProcessor extends Object implements ConfigFileProcessor, org.opendaylight.yangtools.concepts.Registration
Basic substrate for a typical ConfigFileProcessor. Aside from the processor itself, it exposes lifecycle hooks which can be used either by the implementation itself or external users.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractConfigFileProcessor(String name, ConfigLoader configLoader, org.opendaylight.mdsal.dom.api.DOMDataBroker dataBroker)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract @NonNull com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo>
    loadConfiguration(@NonNull org.opendaylight.mdsal.dom.api.DOMDataBroker dataBroker, @NonNull org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode dto)
    Load specified DTO using provided DOMDataBroker.
    final void
    loadConfiguration(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode dto)
    Load the information contained on the normalized node.
    protected final void
    Start this processor by registering it with the config loader.
    protected final void
    Stop this processor by unregistering it from the loader.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.opendaylight.bgpcep.config.loader.spi.ConfigFileProcessor

    fileRootSchema

    Methods inherited from interface org.opendaylight.yangtools.concepts.Registration

    close
  • Constructor Details

    • AbstractConfigFileProcessor

      protected AbstractConfigFileProcessor(String name, ConfigLoader configLoader, org.opendaylight.mdsal.dom.api.DOMDataBroker dataBroker)
  • Method Details

    • loadConfiguration

      public final void loadConfiguration(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode dto)
      Description copied from interface: ConfigFileProcessor
      Load the information contained on the normalized node.
      Specified by:
      loadConfiguration in interface ConfigFileProcessor
      Parameters:
      dto - normalizedNode
    • loadConfiguration

      protected abstract @NonNull com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> loadConfiguration(@NonNull org.opendaylight.mdsal.dom.api.DOMDataBroker dataBroker, @NonNull org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode dto)
      Load specified DTO using provided DOMDataBroker.
      Parameters:
      dataBroker - data broker to use
      dto - normalizedNode
      Returns:
      Transaction commit future
    • start

      protected final void start()
      Start this processor by registering it with the config loader.
      Throws:
      IllegalStateException - if the processor has already been started
    • stop

      protected final void stop()
      Stop this processor by unregistering it from the loader. If this processor is not started, this method does nothing.