905fd59fb4ac617fbb4bb63361b8a408cb4c3d35
[affinity.git] / analytics / northbound / src / main / java / org / opendaylight / controller / analytics / northbound / HostStatistics.java
1 /*
2  * Copyright (c) 2013 Plexxi, 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
9 package org.opendaylight.controller.analytics.northbound;
10
11 import javax.xml.bind.annotation.XmlAccessType;
12 import javax.xml.bind.annotation.XmlAccessorType;
13 import javax.xml.bind.annotation.XmlElement;
14 import javax.xml.bind.annotation.XmlRootElement;
15 import org.opendaylight.controller.sal.core.Host;
16
17 @XmlRootElement
18 @XmlAccessorType(XmlAccessType.NONE)
19 public class HostStatistics {
20     @XmlElement
21     private Host srcHost;
22     @XmlElement
23     private Host dstHost;
24     @XmlElement(name="byteCount")
25     private long byteCount;
26     @XmlElement(name="bitRate")
27     private double bitRate;
28
29     // To satisfy JAXB
30     @SuppressWarnings("unused")
31     private HostStatistics() {
32     }
33
34     public HostStatistics(Host srcHost, Host dstHost, long byteCount, double bitRate) {
35         super();
36         this.srcHost = srcHost;
37         this.dstHost = dstHost;
38         this.byteCount = byteCount;
39         this.bitRate = bitRate;
40     }
41
42     public Host getSrcHost() {
43         return this.srcHost;
44     }
45
46     public void setSrcHost(Host host) {
47         this.srcHost = host;
48     }
49
50     public Host getDstHost() {
51         return this.dstHost;
52     }
53
54     public void setDstHost(Host host) {
55         this.dstHost = host;
56     }
57
58     public long getByteCount() {
59         return this.byteCount;
60     }
61
62     public void setByteCount(long byteCount) {
63         this.byteCount = byteCount;
64     }
65
66     public double getBitRate() {
67         return this.bitRate;
68     }
69
70     public void setBitRate(double bitRate) {
71         this.bitRate = bitRate;
72     }
73 }