BUG 2302 : odl-clustering-test-app should not be part of the odl-restconf-all feature set
[controller.git] / opendaylight / northboundtest / unit_test_suite / src / main / java / org / opendaylight / controller / northboundtest / unittestsuite / internal / Activator.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.controller.northboundtest.unittestsuite.internal;
11
12 import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
13
14 import org.apache.felix.dm.Component;
15
16 public class Activator extends ComponentActivatorAbstractBase {
17
18
19     /**
20      * Function that is used to communicate to dependency manager the
21      * list of known implementations for services inside a container
22      *
23      *
24      * @return An array containing all the CLASS objects that will be
25      * instantiated in order to get an fully working implementation
26      * Object
27      */
28     public Object[] getImplementations() {
29         return null;
30     }
31
32     /**
33      * Function that is called when configuration of the dependencies
34      * is required.
35      *
36      * @param c dependency manager Component object, used for
37      * configuring the dependencies exported and imported
38      * @param imp Implementation class that is being configured,
39      * needed as long as the same routine can configure multiple
40      * implementations
41      * @param containerName The containerName being configured, this allow
42      * also optional per-container different behavior if needed, usually
43      * should not be the case though.
44      */
45     public void configureInstance(Component c, Object imp, String containerName) {
46     }
47
48     /**
49      * Method which tells how many Global implementations are
50      * supported by the bundle. This way we can tune the number of
51      * components created. This components will be created ONLY at the
52      * time of bundle startup and will be destroyed only at time of
53      * bundle destruction, this is the major difference with the
54      * implementation retrieved via getImplementations where all of
55      * them are assumed to be in a Container!
56      *
57      *
58      * @return The list of implementations the bundle will support,
59      * in Global version
60      */
61     protected Object[] getGlobalImplementations() {
62         Object[] res = { API3UnitTest.class };
63         return res;
64     }
65
66     /**
67      * Configure the dependency for a given instance Global
68      *
69      * @param c Component assigned for this instance, this will be
70      * what will be used for configuration
71      * @param imp implementation to be configured
72      * @param containerName container on which the configuration happens
73      */
74     protected void configureGlobalInstance(Component c, Object imp) {
75         if (imp.equals(API3UnitTest.class)) {
76             // Nothing to initialize
77         }
78     }
79 }