Bump odlparent 2.0.2 to 2.0.4
[controller.git] / opendaylight / commons / protocol-framework / src / test / java / org / opendaylight / protocol / framework / Session.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.protocol.framework;
9
10 import java.util.List;
11
12 import org.slf4j.Logger;
13 import org.slf4j.LoggerFactory;
14
15 import com.google.common.collect.Lists;
16
17 public class Session extends AbstractProtocolSession<SimpleMessage> {
18
19     private static final Logger LOG = LoggerFactory.getLogger(Session.class);
20
21     public final List<SimpleMessage> msgs = Lists.newArrayList();
22
23     public boolean up = false;
24
25     @Override
26     public void close() {
27
28     }
29
30     @Override
31     public void handleMessage(final SimpleMessage msg) {
32         LOG.debug("Message received: {}", msg.getMessage());
33         this.up = true;
34         this.msgs.add(msg);
35         LOG.debug(this.msgs.size() + "");
36     }
37
38     @Override
39     public void endOfInput() {
40         LOG.debug("End of input reported.");
41     }
42
43     @Override
44     protected void sessionUp() {
45         LOG.debug("Session up reported.");
46     }
47 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.