2 * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. 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
9 package org.opendaylight.idmanager;
11 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
12 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
13 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
19 public class IdManagerServiceProvider implements BindingAwareProvider,
22 private static final Logger LOG = LoggerFactory.getLogger(IdManagerServiceProvider.class);
23 private IdManager idManager;
26 public void onSessionInitiated(ProviderContext session){
27 LOG.info("IDManagerserviceProvider Session Initiated");
29 final DataBroker dataBroker = session.getSALService(DataBroker.class);
30 idManager = new IdManager(dataBroker);
31 } catch (Exception e) {
32 LOG.error("Error initializing services", e);
37 public void close() throws Exception {