Commit 31aea97
committed
Implement OCPP 2.1 RPC Layer Extensions
Implement the CALLRESULTERROR RPC as a response to a CALLRESULT, in case
that failed internal validation, or if the completion action last added
to the CompletionStage returned by send() using .whenComplete[Async]()
throws any exception.
Add an optional confirmationError() callback method to the ClientEvents
and ServerEvents interfaces to allow the application to get notified
about an incoming CALLRESULTERROR. The application may use the uniqueId
parameter to match it to the Request#getOcppMessageId() of one of the
requests it last responded to, provided it keeps track of them.
Implement the SEND RPC as requests which do not have a confirmation
type. These are sent through the existing send() method, returning a
CompletableFuture which is already completed when the method returns,
to which a completion action can be added to check whether a local
exception prevented the request from being sent.
Fix the only OCPP message using the SEND RPC, NotifyPeriodicEventStream,
and add its missing Feature and Function handlers. The handler for this
message is a void method, as it has no response.
Remove sending CALLERROR in response to anything other than a CALL,
except for the RpcFrameworkError when the message could not be parsed.
Simplify the pendingPromises synchronization in Session by using the
ConcurrentHashMap class rather than HashMap.
Fix a few typos encountered along the way.1 parent febd153 commit 31aea97
File tree
36 files changed
+721
-102
lines changed- ocpp-common
- src
- main/java/eu/chargetime/ocpp
- feature
- model
- test/java/eu/chargetime/ocpp/test
- ocpp-json/src/main/java/eu/chargetime/ocpp
- ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp
- ocpp-v2/src/main/java/eu/chargetime/ocpp
- feature
- function
- v21
- feature
- function
- model/messages
36 files changed
+721
-102
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
74 | | - | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
79 | 93 | | |
80 | 94 | | |
81 | 95 | | |
| |||
112 | 126 | | |
113 | 127 | | |
114 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
115 | 141 | | |
116 | 142 | | |
117 | 143 | | |
| |||
137 | 163 | | |
138 | 164 | | |
139 | 165 | | |
140 | | - | |
| 166 | + | |
| 167 | + | |
141 | 168 | | |
142 | 169 | | |
143 | 170 | | |
| |||
166 | 193 | | |
167 | 194 | | |
168 | 195 | | |
169 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
170 | 201 | | |
171 | 202 | | |
172 | 203 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
Lines changed: 92 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
100 | 121 | | |
101 | 122 | | |
102 | 123 | | |
| |||
177 | 198 | | |
178 | 199 | | |
179 | 200 | | |
180 | | - | |
| 201 | + | |
181 | 202 | | |
182 | 203 | | |
183 | 204 | | |
| |||
216 | 237 | | |
217 | 238 | | |
218 | 239 | | |
219 | | - | |
| 240 | + | |
220 | 241 | | |
221 | 242 | | |
222 | 243 | | |
| |||
240 | 261 | | |
241 | 262 | | |
242 | 263 | | |
243 | | - | |
| 264 | + | |
244 | 265 | | |
245 | 266 | | |
246 | 267 | | |
| |||
257 | 278 | | |
258 | 279 | | |
259 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
260 | 340 | | |
261 | 341 | | |
262 | 342 | | |
| |||
289 | 369 | | |
290 | 370 | | |
291 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
292 | 376 | | |
293 | 377 | | |
294 | 378 | | |
| |||
297 | 381 | | |
298 | 382 | | |
299 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
300 | 387 | | |
301 | 388 | | |
302 | 389 | | |
| |||
318 | 405 | | |
319 | 406 | | |
320 | 407 | | |
321 | | - | |
| 408 | + | |
322 | 409 | | |
323 | 410 | | |
324 | 411 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
69 | 94 | | |
70 | 95 | | |
71 | 96 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
0 commit comments