Bug 5596 Cleaning part 1
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / device / DeviceStateImpl.java
1 /**
2  * Copyright (c) 2015 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
9 package org.opendaylight.openflowplugin.impl.device;
10
11 import org.opendaylight.openflowplugin.api.openflow.device.DeviceState;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FeaturesReply;
14
15 /**
16  * openflowplugin-impl
17  * org.opendaylight.openflowplugin.impl.device
18  * <p/>
19  * DeviceState is builded from {@link FeaturesReply} and {@link NodeId}. Both values are inside
20  * {@link org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext}
21  *
22  */
23 class DeviceStateImpl implements DeviceState {
24
25     private boolean meterIsAvailable;
26     private boolean groupIsAvailable;
27     private boolean flowStatisticsAvailable;
28     private boolean tableStatisticsAvailable;
29     private boolean portStatisticsAvailable;
30     private boolean statPollEnabled;
31     private boolean queueStatisticsAvailable;
32
33     public DeviceStateImpl() {
34         statPollEnabled = false;
35     }
36
37     @Override
38     public boolean isMetersAvailable() {
39         return meterIsAvailable;
40     }
41
42     @Override
43     public void setMeterAvailable(final boolean available) {
44         meterIsAvailable = available;
45     }
46
47     @Override
48     public boolean isGroupAvailable() {
49         return groupIsAvailable;
50     }
51
52     @Override
53     public void setGroupAvailable(final boolean available) {
54         groupIsAvailable = available;
55     }
56
57     @Override
58     public boolean isFlowStatisticsAvailable() {
59         return flowStatisticsAvailable;
60     }
61
62     @Override
63     public void setFlowStatisticsAvailable(final boolean available) {
64         flowStatisticsAvailable = available;
65     }
66
67     @Override
68     public boolean isTableStatisticsAvailable() {
69         return tableStatisticsAvailable;
70     }
71
72     @Override
73     public void setTableStatisticsAvailable(final boolean available) {
74         tableStatisticsAvailable = available;
75     }
76
77     @Override
78     public boolean isPortStatisticsAvailable() {
79         return portStatisticsAvailable;
80     }
81
82     @Override
83     public void setPortStatisticsAvailable(final boolean available) {
84         portStatisticsAvailable = available;
85     }
86
87     @Override
88     public boolean isQueueStatisticsAvailable() {
89         return queueStatisticsAvailable;
90     }
91
92     @Override
93     public void setQueueStatisticsAvailable(final boolean available) {
94         queueStatisticsAvailable = available;
95
96     }
97
98     @Override
99     public boolean isStatisticsPollingEnabled() {
100         return statPollEnabled;
101     }
102
103 }