2 * Copyright (c) 2015 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
9 package org.opendaylight.protocol.bmp.impl.session;
11 import com.google.common.collect.Lists;
12 import java.util.List;
13 import org.opendaylight.protocol.bmp.api.BmpSession;
14 import org.opendaylight.protocol.bmp.api.BmpSessionListener;
15 import org.opendaylight.yangtools.yang.binding.Notification;
16 import org.slf4j.Logger;
17 import org.slf4j.LoggerFactory;
20 * Created by cgasparini on 21.5.2015.
22 public class BmpTestSessionListener implements BmpSessionListener {
24 private static final Logger LOG = LoggerFactory.getLogger(BmpTestSessionListener.class);
25 private List<Notification> messages = Lists.newArrayList();
26 private boolean up = false;
28 public boolean isUp () {
32 public List<Notification> getListMsg() {
37 public void onMessage(final Notification message) {
38 LOG.debug("Received message: {} {}", message.getClass(), message);
39 this.messages.add(message);
43 public synchronized void onSessionUp(final BmpSession session) {
44 LOG.debug("Session up.");
49 public void onSessionDown(final Exception e) {
50 LOG.debug("Session down.", e);