2 * Copyright (c) 2014, 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
8 package org.opendaylight.openflowplugin.test;
10 import org.opendaylight.controller.sal.binding.api.NotificationService;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.topology.discovery.rev130819.FlowTopologyDiscoveryListener;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.topology.discovery.rev130819.LinkDiscovered;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.topology.discovery.rev130819.LinkOverutilized;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.topology.discovery.rev130819.LinkRemoved;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.topology.discovery.rev130819.LinkUtilizationNormal;
16 import org.slf4j.Logger;
17 import org.slf4j.LoggerFactory;
19 public class OpenflowpluginTestTopologyNotification {
21 private static final Logger LOG = LoggerFactory.getLogger(OpenflowpluginTestTopologyNotification.class);
23 private final TopologyEventListener topologyEventListener = new TopologyEventListener();
24 private final NotificationService notificationService;
26 public OpenflowpluginTestTopologyNotification(NotificationService notificationService) {
27 this.notificationService = notificationService;
32 notificationService.registerNotificationListener(topologyEventListener);
35 private static final class TopologyEventListener implements FlowTopologyDiscoveryListener {
37 public void onLinkDiscovered(LinkDiscovered notification) {
38 LOG.debug("-------------------------------------------");
39 LOG.debug("LinkDiscovered notification ........");
40 LOG.debug("-------------------------------------------");
44 public void onLinkOverutilized(LinkOverutilized notification) {
45 LOG.debug("-------------------------------------------");
46 LOG.debug("LinkOverutilized notification ........");
47 LOG.debug("-------------------------------------------");
51 public void onLinkRemoved(LinkRemoved notification) {
52 LOG.debug("-------------------------------------------");
53 LOG.debug("LinkRemoved notification ........");
54 LOG.debug("-------------------------------------------");
58 public void onLinkUtilizationNormal(LinkUtilizationNormal notification) {
59 LOG.debug("-------------------------------------------");
60 LOG.debug("LinkUtilizationNormal notification ........");
61 LOG.debug("-------------------------------------------");