Merge "Address @XmlSeeAlso limitation. Provide the ability to inject the JAXB types...
[controller.git] / opendaylight / northbound / bundlescanner / implementation / src / main / java / org / opendaylight / controller / northbound / bundlescanner / internal / Activator.java
1 /**
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.northbound.bundlescanner.internal;
10
11 import org.apache.felix.dm.Component;
12 import org.opendaylight.controller.northbound.bundlescanner.IBundleScanService;
13 import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
14
15 /**
16  * The activator registers the BundleScanner.
17  */
18 public class Activator extends ComponentActivatorAbstractBase {
19
20     @Override
21     protected void init() {
22     }
23
24     @Override
25     protected void destroy() {
26     }
27
28     @Override
29     protected Object[] getGlobalImplementations() {
30         return new Object[] { BundleScanServiceImpl.class };
31     }
32
33     @Override
34     protected void configureGlobalInstance(Component c, Object imp) {
35         if (!imp.equals(BundleScanServiceImpl.class)) return;
36         // export service
37         c.setInterface(
38                 new String[] { IBundleScanService.class.getName() },
39                 null);
40     }
41
42 }