Commit fe90a7d
Zeroconf ApiServer (#128)
* Add Zeroconf Apiserver functionality
xyz.gianlu.librespot.core.ZeroconfServer now extends java.util.Observable, notifies observers when a new Session is created
add method xyz.gianlu.librespot.api.server.ApiServer.clearHandlers(), clears the ApiHandlers Map
add class ZeroconfApiServer, extends xyz.gianlu.librespot.api.server.ApiServer, observes the ZeroconfServer, updates when a new Session is created in ZeroconfServer
* fix Observer not getting updated
Session had to be authenticated before registering request handlers
* Moved from Observable to Listener pattern
Observer and Observable is deprecated in java 11+
* removed unused imports
* Minor refactoring1 parent 296b7af commit fe90a7d
4 files changed
Lines changed: 67 additions & 6 deletions
File tree
- api/src/main/java/xyz/gianlu/librespot/api
- server
- core/src/main/java/xyz/gianlu/librespot/core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
18 | 26 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
23 | 32 | | |
24 | 33 | | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| |||
312 | 315 | | |
313 | 316 | | |
314 | 317 | | |
| 318 | + | |
| 319 | + | |
315 | 320 | | |
316 | 321 | | |
317 | 322 | | |
318 | 323 | | |
319 | 324 | | |
320 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
321 | 334 | | |
322 | 335 | | |
323 | 336 | | |
| |||
327 | 340 | | |
328 | 341 | | |
329 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
330 | 347 | | |
331 | 348 | | |
332 | 349 | | |
| |||
402 | 419 | | |
403 | 420 | | |
404 | 421 | | |
405 | | - | |
| 422 | + | |
406 | 423 | | |
407 | 424 | | |
408 | 425 | | |
| |||
436 | 453 | | |
437 | 454 | | |
438 | 455 | | |
| 456 | + | |
439 | 457 | | |
| 458 | + | |
440 | 459 | | |
0 commit comments