1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.directory.server.ntp.messages;
22
23
24
25
26
27 public class NtpMessageModifier
28 {
29 private LeapIndicatorType leapIndicator;
30 private int versionNumber;
31 private ModeType mode;
32 private StratumType stratumType;
33 private byte pollInterval;
34 private byte precision;
35 private int rootDelay;
36 private int rootDispersion;
37
38 private ReferenceIdentifier referenceIdentifier;
39
40 private NtpTimeStamp referenceTimestamp;
41 private NtpTimeStamp originateTimestamp;
42 private NtpTimeStamp receiveTimestamp;
43 private NtpTimeStamp transmitTimestamp;
44
45
46
47
48
49
50
51 public NtpMessage getNtpMessage()
52 {
53 return new NtpMessage( leapIndicator, versionNumber, mode, stratumType, pollInterval, precision, rootDelay,
54 rootDispersion, referenceIdentifier, referenceTimestamp, originateTimestamp, receiveTimestamp,
55 transmitTimestamp );
56 }
57
58
59
60
61
62 public void setLeapIndicator( LeapIndicatorType leapIndicator )
63 {
64 this.leapIndicator = leapIndicator;
65 }
66
67
68
69
70
71 public void setMode( ModeType mode )
72 {
73 this.mode = mode;
74 }
75
76
77
78
79
80 public void setOriginateTimestamp( NtpTimeStamp originateTimestamp )
81 {
82 this.originateTimestamp = originateTimestamp;
83 }
84
85
86
87
88
89 public void setPollInterval( byte pollInterval )
90 {
91 this.pollInterval = pollInterval;
92 }
93
94
95
96
97
98 public void setPrecision( byte precision )
99 {
100 this.precision = precision;
101 }
102
103
104
105
106
107 public void setReceiveTimestamp( NtpTimeStamp receiveTimestamp )
108 {
109 this.receiveTimestamp = receiveTimestamp;
110 }
111
112
113
114
115
116 public void setReferenceIdentifier( ReferenceIdentifier referenceIdentifier )
117 {
118 this.referenceIdentifier = referenceIdentifier;
119 }
120
121
122
123
124
125 public void setReferenceTimestamp( NtpTimeStamp referenceTimestamp )
126 {
127 this.referenceTimestamp = referenceTimestamp;
128 }
129
130
131
132
133
134 public void setRootDelay( int rootDelay )
135 {
136 this.rootDelay = rootDelay;
137 }
138
139
140
141
142
143 public void setRootDispersion( int rootDispersion )
144 {
145 this.rootDispersion = rootDispersion;
146 }
147
148
149
150
151
152 public void setStratum( StratumType stratumType )
153 {
154 this.stratumType = stratumType;
155 }
156
157
158
159
160
161 public void setTransmitTimestamp( NtpTimeStamp transmitTimestamp )
162 {
163 this.transmitTimestamp = transmitTimestamp;
164 }
165
166
167
168
169
170 public void setVersionNumber( int versionNumber )
171 {
172 this.versionNumber = versionNumber;
173 }
174 }