1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.waarp.openr66.protocol.localhandler.packet.json;
21
22 import org.waarp.openr66.protocol.localhandler.packet.LocalPacketFactory;
23
24
25
26
27 public class BandwidthJsonPacket extends JsonPacket {
28
29 protected boolean setter;
30 protected long writeglobal = -10;
31 protected long readglobal = -10;
32 protected long writesession = -10;
33 protected long readsession = -10;
34
35
36
37
38 public final boolean isSetter() {
39 return setter;
40 }
41
42
43
44
45 public final void setSetter(final boolean setter) {
46 this.setter = setter;
47 }
48
49
50
51
52 public final long getWriteglobal() {
53 return writeglobal;
54 }
55
56
57
58
59 public final void setWriteglobal(final long writeglobal) {
60 this.writeglobal = writeglobal;
61 }
62
63
64
65
66 public final long getReadglobal() {
67 return readglobal;
68 }
69
70
71
72
73 public final void setReadglobal(final long readglobal) {
74 this.readglobal = readglobal;
75 }
76
77
78
79
80 public final long getWritesession() {
81 return writesession;
82 }
83
84
85
86
87 public final void setWritesession(final long writesession) {
88 this.writesession = writesession;
89 }
90
91
92
93
94 public final long getReadsession() {
95 return readsession;
96 }
97
98
99
100
101 public final void setReadsession(final long readsession) {
102 this.readsession = readsession;
103 }
104
105 @Override
106 public final void fromJson(final JsonPacket other) {
107 super.fromJson(other);
108 if (other instanceof BandwidthJsonPacket) {
109 final BandwidthJsonPacket other2 = (BandwidthJsonPacket) other;
110 setter = other2.setter;
111 writeglobal = other2.writeglobal;
112 readglobal = other2.readglobal;
113 writesession = other2.writeglobal;
114 readsession = other2.readsession;
115 }
116 }
117
118 @Override
119 public final void setRequestUserPacket() {
120 setRequestUserPacket(LocalPacketFactory.BANDWIDTHPACKET);
121 }
122
123 }