Move init and destroy empty impl from Activator classes. Have only one
[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 Object[] getGlobalImplementations() {
22         return new Object[] { BundleScanServiceImpl.class };
23     }
24
25     @Override
26     protected void configureGlobalInstance(Component c, Object imp) {
27         if (!imp.equals(BundleScanServiceImpl.class)) return;
28         // export service
29         c.setInterface(
30                 new String[] { IBundleScanService.class.getName() },
31                 null);
32     }
33
34 }