Class CentralizedSwitchChangeListener

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.util.EventListener, org.opendaylight.mdsal.binding.api.DataTreeChangeListener<RouterToNaptSwitch>, org.opendaylight.serviceutils.tools.listener.ChainableDataTreeChangeListener<RouterToNaptSwitch>

    @Singleton
    public class CentralizedSwitchChangeListener
    extends org.opendaylight.serviceutils.tools.listener.AbstractAsyncDataTreeChangeListener<RouterToNaptSwitch>
    CentralizedSwitchChangeListener detect changes in switch:router mapping and update flows accordingly.
    The centralized switch a.k.a NAPT switch is currently defined using models residing in natservice bundle. As the roles of centralized switch will grow beyond NAT use cases, the associated models and logic need to be renamed and moved to either vpnmanager or new bundle as part of Carbon model changes
    • Constructor Detail

      • CentralizedSwitchChangeListener

        @Inject
        public CentralizedSwitchChangeListener​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker,
                                               IVpnManager vpnManager,
                                               ExternalRouterDataUtil externalRouterDataUtil,
                                               VpnUtil vpnUtil)
    • Method Detail

      • start

        public void start()
      • close

        @PreDestroy
        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • addBeforeListener

        public void addBeforeListener​(org.opendaylight.mdsal.binding.api.DataTreeChangeListener<T> arg0)
        Specified by:
        addBeforeListener in interface org.opendaylight.serviceutils.tools.listener.ChainableDataTreeChangeListener<T extends org.opendaylight.yangtools.yang.binding.DataObject>
      • addAfterListener

        public void addAfterListener​(org.opendaylight.mdsal.binding.api.DataTreeChangeListener<T> arg0)
        Specified by:
        addAfterListener in interface org.opendaylight.serviceutils.tools.listener.ChainableDataTreeChangeListener<T extends org.opendaylight.yangtools.yang.binding.DataObject>
      • register

        @PostConstruct
        public void register()
      • getDataBroker

        protected org.opendaylight.mdsal.binding.api.DataBroker getDataBroker()
      • getDataStoreMetrics

        protected org.opendaylight.serviceutils.tools.listener.DataStoreMetrics getDataStoreMetrics()
      • add

        @Deprecated
        public void add​(T arg0)
        Deprecated.
      • remove

        @Deprecated
        public void remove​(T arg0)
        Deprecated.
      • update

        @Deprecated
        public void update​(T arg0,
                           T arg1)
        Deprecated.
      • onDataTreeChanged

        public default void onDataTreeChanged​(java.util.Collection<org.opendaylight.mdsal.binding.api.DataTreeModification<T>> arg0,
                                              org.opendaylight.serviceutils.tools.listener.DataStoreMetrics arg1)