2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
10 * Copyright (c) 2013 Plexxi, Inc. and others. All rights reserved.
13 package org.opendaylight.affinity.nfchain.provider;
15 import java.util.Dictionary;
16 import java.util.HashSet;
17 import java.util.Hashtable;
19 import java.util.Collection;
20 import java.util.Collections;
22 import org.opendaylight.controller.sal.binding.api.AbstractBindingAwareProvider;
23 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
24 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
25 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
26 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext;
27 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
29 import org.opendaylight.yangtools.yang.binding.RpcService;
30 import org.osgi.framework.BundleActivator;
31 import org.osgi.framework.BundleContext;
32 import org.osgi.framework.ServiceReference;
33 import org.slf4j.Logger;
34 import org.slf4j.LoggerFactory;
36 import org.opendaylight.controller.hosttracker.IfIptoHost;
37 import org.opendaylight.controller.hosttracker.IfNewHostNotify;
39 import org.opendaylight.yang.gen.v1.urn.opendaylight.affinity.nfchain.rev131020.NfchainService;
41 public class Activator extends AbstractBindingAwareProvider {
42 protected static final Logger log = LoggerFactory
43 .getLogger(Activator.class);
45 private ProviderContext providerContext;
46 private NfchainManager nfcmgr;
49 nfcmgr = new NfchainManager();
53 public void onSessionInitiated(ProviderContext session) {
54 log.info("Provider session initialized");
56 this.providerContext = session;
57 nfcmgr.setNotificationProvider(session.getSALService(NotificationProviderService.class));
58 providerContext.addRpcImplementation(NfchainService.class, nfcmgr);
62 public Collection<? extends RpcService> getImplementations() {
63 return Collections.emptySet();
67 public Collection<? extends ProviderFunctionality> getFunctionality() {
68 return Collections.emptySet();