Move init and destroy empty impl from Activator classes. Have only one 27/1327/1
authorAlissa Bonas <abonas@redhat.com>
Sun, 22 Sep 2013 19:10:09 +0000 (22:10 +0300)
committerAlissa Bonas <abonas@redhat.com>
Sun, 22 Sep 2013 19:10:09 +0000 (22:10 +0300)
empty implementation in parent class instead of having it in more than
20 classes. Only one class actually has a non empty implementation and
it overrides the empty implementation from the parent.

Change-Id: Ibbe43ba3e48e4eb80402c158cd45be0afc497fae
Signed-off-by: Alissa Bonas <abonas@redhat.com>
26 files changed:
opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/internal/Activator.java
opendaylight/clustering/services_implementation/src/main/java/org/opendaylight/controller/clustering/services_implementation/internal/Activator.java
opendaylight/clustering/stub/src/main/java/org/opendaylight/controller/clustering/stub/internal/Activator.java
opendaylight/clustering/test/src/main/java/org/opendaylight/controller/clustering/test/internal/Activator.java
opendaylight/configuration/implementation/src/main/java/org/opendaylight/controller/configuration/internal/Activator.java
opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/internal/Activator.java
opendaylight/containermanager/implementation/src/main/java/org/opendaylight/controller/containermanager/internal/Activator.java
opendaylight/containermanager/it.implementation/src/main/java/org/opendaylight/controller/containermanager/internal/Activator.java
opendaylight/forwarding/staticrouting/src/main/java/org/opendaylight/controller/forwarding/staticrouting/internal/Activator.java
opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/Activator.java
opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/Activator.java
opendaylight/hosttracker_new/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/Activator.java
opendaylight/northbound/bundlescanner/implementation/src/main/java/org/opendaylight/controller/northbound/bundlescanner/internal/Activator.java
opendaylight/northboundtest/unit_test_suite/src/main/java/org/opendaylight/controller/northboundtest/unittestsuite/internal/Activator.java
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java
opendaylight/routing/dijkstra_implementation/src/main/java/org/opendaylight/controller/routing/dijkstra_implementation/internal/Activator.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/ComponentActivatorAbstractBase.java
opendaylight/sal/connection/implementation/src/main/java/org/opendaylight/controller/sal/connection/implementation/internal/Activator.java
opendaylight/sal/implementation/src/main/java/org/opendaylight/controller/sal/implementation/internal/Activator.java
opendaylight/sal/networkconfiguration/implementation/src/main/java/org/opendaylight/controller/sal/networkconfig/internal/Activator.java
opendaylight/samples/loadbalancer/src/main/java/org/opendaylight/controller/samples/loadbalancer/internal/Activator.java
opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/Activator.java
opendaylight/statisticsmanager/implementation/src/main/java/org/opendaylight/controller/statisticsmanager/internal/Activator.java
opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/Activator.java
opendaylight/topologymanager/implementation/src/main/java/org/opendaylight/controller/topologymanager/internal/Activator.java
opendaylight/usermanager/implementation/src/main/java/org/opendaylight/controller/usermanager/internal/Activator.java

index 248623cce8326e93288498d9af9ec15d92b100a2..f4edf6c74e989d6ce45fe6be27ca9c0d3fb44a0b 100644 (file)
@@ -33,24 +33,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    public void init() {
-
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    public void destroy() {
-
-    }
 
     /**
      * Function that is used to communicate to dependency manager the
index 17df387d3e3bb156fab1bbdf350283652f496f8d..35b51466795c060c0dfc0112ea8826917edda2ce 100644 (file)
@@ -25,24 +25,7 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-    }
 
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-    }
 
     /**
      * Function that is used to communicate to dependency manager the
index e73155a3e8fb0574d267cee913f9fbbe781fc201..1b5c30b1e082de485c869228ae64360052036ecf 100644 (file)
@@ -24,22 +24,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    public void init() {
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    public void destroy() {
-    }
 
     /**
      * Function that is used to communicate to dependency manager the
index 341eacc4c620f2cb902927c69b832b03a43fc206..1c02a1495cf705125f2c6df41ae5a192804213ee 100644 (file)
@@ -19,22 +19,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    public void init() {
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    public void destroy() {
-    }
 
     /**
      * Function that is used to communicate to dependency manager the
index 78b64400c8fcc44acba896397d621243848f9ea4..871fd0704e42848259de19fa279859fd597e92ae 100644 (file)
@@ -37,22 +37,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    public void init() {
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    public void destroy() {
-    }
 
     /**
      * Function that is used to communicate to dependency manager the
index c0d1b50a4657a314fbcdd7010fdb89d28e72ffa8..8912aebbf3256584f908f6a4a54d54f926e24ff7 100644 (file)
@@ -32,24 +32,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-    }
 
     /**
      * Method which tells how many Global implementations are
index aab07afa9e5d36bed64e22840cc169c3c2b2fee5..a1fe0d1ee2a1936af798b88ff887b54b693b35cf 100644 (file)
@@ -30,23 +30,6 @@ import org.slf4j.LoggerFactory;
 public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory.getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some initializations
-     * are done by the ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-    }
-
-    /**
-     * Function called when the activator stops just before the cleanup done by
-     * ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-    }
 
     /**
      * Function that is used to communicate to dependency manager the list of
index 9caa62072cc88c3b50cfa5a670dc53635d14b5d0..bc0bba8dc2e1d033fa1ca578756a6b6bf9c2d2d6 100644 (file)
@@ -23,22 +23,7 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    public void init() {
-    }
 
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    public void destroy() {
-    }
 
     /**
      * Function that is used to communicate to dependency manager the
index a4397537486e738b482184ab6dc768270594e413..7e1e79a17c60ebaed89c7f7ff979c7ab28c6a149 100644 (file)
@@ -30,24 +30,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    public void init() {
-
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    public void destroy() {
-
-    }
 
     /**
      * Function that is used to communicate to dependency manager the
index cc0a0444b218a624abac6365b8f45561cfa057ef..225db117c07ed88bc297e7c248afef30513f62be 100644 (file)
@@ -35,25 +35,6 @@ import org.opendaylight.controller.connectionmanager.IConnectionManager;
 public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory.getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some initializations
-     * are done by the ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-
-    }
-
-    /**
-     * Function called when the activator stops just before the cleanup done by
-     * ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-
-    }
 
     /**
      * Function that is used to communicate to dependency manager the list of
index 3af9826b7e38efe8306a452f0ca2406a6e7d1698..c768cecf15fc44874069f3ec0691fb8d20a9abc2 100644 (file)
@@ -33,23 +33,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some initializations
-     * are done by the ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-    }
-
-    /**
-     * Function called when the activator stops just before the cleanup done by
-     * ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-    }
 
     /**
      * Function that is used to communicate to dependency manager the list of
index cb02476607814901ce0ec65c1fa1171a19879d10..99be54e77eafe0372bb0b65034ee5af6da64a1db 100644 (file)
@@ -28,15 +28,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    @Override
-    protected void init() {
-
-    }
-
-    @Override
-    protected void destroy() {
-
-    }
 
     /**
      * Function that is used to communicate to dependency manager the list of
index 6b0718c7e2c1ffb463dfa921410344e249da1fca..82de105709004b5ba5323de0f58f6c822431fa57 100644 (file)
@@ -17,14 +17,6 @@ import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
  */
 public class Activator extends ComponentActivatorAbstractBase {
 
-    @Override
-    protected void init() {
-    }
-
-    @Override
-    protected void destroy() {
-    }
-
     @Override
     protected Object[] getGlobalImplementations() {
         return new Object[] { BundleScanServiceImpl.class };
index 71f5cfd0e6452d9e4d7fde0bcd07aad607a25b85..471a440c38dbc4f2b4fe1d8291e66efadefae36d 100644 (file)
@@ -15,22 +15,6 @@ import org.apache.felix.dm.Component;
 
 public class Activator extends ComponentActivatorAbstractBase {
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    public void init() {
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    public void destroy() {
-    }
 
     /**
      * Function that is used to communicate to dependency manager the
index ee62204f3fa233e4918ec3f3aaa3470e051755b3..07c08129db09cc96dbe8d75d8ded82e9d4b1792e 100644 (file)
@@ -57,23 +57,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some initializations
-     * are done by the ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-    }
-
-    /**
-     * Function called when the activator stops just before the cleanup done by
-     * ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-    }
 
     /**
      * Function that is used to communicate to dependency manager the list of
index 82f37d0235842fdf05fa735ae33cb7324da5c3c8..5a83eaa3d66d40d271b13df368c549197111f102 100644 (file)
@@ -29,26 +29,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-
-    }
-
     /**
      * Function that is used to communicate to dependency manager the
      * list of known implementations for services inside a container
index de77837c34a1472249b7fe69cd9ac64d10ba129a..439e7807d4f52894244ceac0978a8972c5b6850e 100644 (file)
@@ -49,18 +49,20 @@ abstract public class ComponentActivatorAbstractBase implements
     private ConcurrentMap<Object, Component> dbGlobalInstances = (ConcurrentMap<Object, Component>) new ConcurrentHashMap<Object, Component>();
 
     /**
-     * Abstract method that MUST be implemented by the derived class
-     * that wants to activate the Component bundle in a container. Here
-     * customization for the component are expected
+     * Method that should be overriden by the derived class for customization
+     * during activation of the Component bundle in a container.
      */
-    abstract protected void init();
+    protected void init() {
+
+    }
 
     /**
-     * Abstract method that MUST be implemented by the derived class
-     * that wants to DE-activate the Component bundle in a container. Here
-     * customization for the component are expected
+     * Method that should be overriden by the derived class for customization
+     * during DE-activation of the Component bundle in a container.
      */
-    abstract protected void destroy();
+    public void destroy() {
+
+    }
 
     /**
      * Method which tells how many implementations are supported by
index 68cd10d3595e25750d0f61f714627e7e3d378635..c4e38a1d635a41d4085f4b25acace7e3dec735d8 100644 (file)
@@ -21,26 +21,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some initializations
-     * are done by the ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-
-    }
-
-    /**
-     * Function called when the activator stops just before the cleanup done by
-     * ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-
-    }
-
     /**
      * Function that is used to communicate to dependency manager the list of
      * known Global implementations
index c3afae90f8ae32785ab927c13282a05cd53b2437..98cb3b83ca6347a13e25c1c0674ca53f766a3848 100644 (file)
@@ -40,25 +40,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some initializations
-     * are done by the ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-
-    }
-
-    /**
-     * Function called when the activator stops just before the cleanup done by
-     * ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-
-    }
 
     /**
      * Function that is used to communicate to dependency manager the list of
index d647faab07551734727c545ce4a745b3291ff9fa..7769a380d30cb662040d48836e2251f00d1fcce7 100644 (file)
@@ -12,25 +12,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some initializations
-     * are done by the ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-
-    }
-
-    /**
-     * Function called when the activator stops just before the cleanup done by
-     * ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-
-    }
 
     /**
      * Function that is used to communicate to dependency manager the list of
index fc78a72eaf0ff08b9b8a1010a04a9dc76b2a82e0..8979fecf45e94d7e2ffa42c57e38f492caa68a91 100644 (file)
@@ -35,22 +35,6 @@ public class Activator extends ComponentActivatorAbstractBase {
      */
     protected static final Logger logger = LoggerFactory.getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    public void init() {
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    public void destroy() {
-    }
 
     /**
      * Function that is used to communicate to dependency manager the
index bf6c1f4213585dcee6a20bd37cdb339e5ce3ad89..f3a38ed98fdafddb6a9ecc53a75f9080859f1e70 100644 (file)
@@ -28,24 +28,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    public void init() {
-
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    public void destroy() {
-
-    }
 
     /**
      * Function that is used to communicate to dependency manager the
index f9a07ed0f88e9da5472c92225cf17cdffbcffd6b..5afaaa69167f76081c35468693623af8a2f654f5 100644 (file)
@@ -23,21 +23,6 @@ import org.slf4j.LoggerFactory;
 public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory.getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some initializations
-     * are done by the ComponentActivatorAbstractBase.
-     *
-     */
-    public void init() {
-    }
-
-    /**
-     * Function called when the activator stops just before the cleanup done by
-     * ComponentActivatorAbstractBase
-     *
-     */
-    public void destroy() {
-    }
 
     /**
      * Function that is used to communicate to dependency manager the list of
index f177d103dcf1b2ba57a691d88c3e8bc795f2d4fd..f55fc8e5ee9d574be44cbf907d9e075b50a6f4dd 100644 (file)
@@ -32,26 +32,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-
-    }
 
     /**
      * Function that is used to communicate to dependency manager the
index d8ff141edea4da61492cd9e79bbc76d6acede158..30a9445b1d5582fe1f78573d4a7b0e0e28674a5e 100644 (file)
@@ -31,26 +31,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-
-    }
 
     /**
      * Function that is used to communicate to dependency manager the
index 3898ca589ae710d36ea847eae03aa3742a6cccd6..77da099d67d033c9cc19e6acb66a2d4551015056 100644 (file)
@@ -29,26 +29,6 @@ public class Activator extends ComponentActivatorAbstractBase {
     protected static final Logger logger = LoggerFactory
             .getLogger(Activator.class);
 
-    /**
-     * Function called when the activator starts just after some
-     * initializations are done by the
-     * ComponentActivatorAbstractBase.
-     *
-     */
-    @Override
-    public void init() {
-
-    }
-
-    /**
-     * Function called when the activator stops just before the
-     * cleanup done by ComponentActivatorAbstractBase
-     *
-     */
-    @Override
-    public void destroy() {
-
-    }
 
     /**
      * Function that is used to communicate to dependency manager the