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
8 package org.opendaylight.openflowplugin.test;
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAdded;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowRemoved;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowUpdated;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeExperimenterErrorNotification;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SwitchFlowRemoved;
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
21 * Dummy implementation flushing events into log.
23 public class FlowEventListenerLoggingImpl implements SalFlowListener {
25 private static final Logger LOG = LoggerFactory
26 .getLogger(FlowEventListenerLoggingImpl.class);
29 public void onFlowAdded(FlowAdded notification) {
30 LOG.info("flow to be added {}", notification.toString());
31 LOG.info("added flow Xid {}", notification.getTransactionId().getValue());
35 public void onFlowRemoved(FlowRemoved notification) {
36 LOG.debug("removed flow {}", notification.toString());
37 LOG.debug("remove flow Xid {}", notification.getTransactionId().getValue());
41 public void onFlowUpdated(FlowUpdated notification) {
42 LOG.debug("updated flow {}", notification.toString());
43 LOG.debug("updated flow Xid {}", notification.getTransactionId().getValue());
47 public void onNodeErrorNotification(NodeErrorNotification notification) {
48 //commenting as we have a NodeErrorListener
49 /* LOG.error("Error notification flow Xid........................."
50 + notification.getTransactionId().getValue());
51 LOG.debug("notification Begin-Transaction:"
52 + notification.getTransactionUri()
53 + "-----------------------------------------------------------------------------------");
58 public void onNodeExperimenterErrorNotification(
59 NodeExperimenterErrorNotification notification) {
60 // TODO Auto-generated method stub
65 public void onSwitchFlowRemoved(SwitchFlowRemoved notification) {
66 LOG.debug("Switch flow removed : Cookies {}", notification.getCookie().toString());