2 * Copyright (c) 2016 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
8 package org.opendaylight.vpnservice.fcapsmanager.alarmmanager;
10 import org.osgi.framework.BundleActivator;
11 import org.osgi.framework.BundleContext;
12 import org.slf4j.Logger;
13 import org.slf4j.LoggerFactory;
15 public class Activator implements BundleActivator {
16 static Logger s_logger = LoggerFactory.getLogger(Activator.class);
17 private Runnable listener;
18 private Thread listenerThread;
20 public void start(BundleContext context) {
21 s_logger.info("Starting alarmmanager bundle");
22 AlarmNotificationListeners notificationListeners = new AlarmNotificationListeners(context);
24 listener = notificationListeners;
25 listenerThread = new Thread(listener);
26 listenerThread.start();
27 } catch (Exception e) {
28 s_logger.error("Exception in alarm thread {}", e);
32 public void stop(BundleContext context) {
33 s_logger.info("Stopping alarmmanager bundle");