Commit 2c55200
authored
AntPatternNamespace had no notion of an optional trailing query string,
which (a) polluted the last path variable when a subject carried a
`?query`, and (b) left consumers no way to read query parameters.
util:
- Strip an optional trailing `?query` before match/extractPathVariables
so path variables are never polluted (fixes the bug).
- Add extractQueryParameters(subject): parses `?a=b&c=d` into a map
(empty when absent), via a shared pure parseQueryString helper
(URL-decoding, empty values, last-wins on repeated keys).
- URL-decode path variables too, for consistency with the Spring
DataSourceMessageHandler which already decodes destination variables.
NOTE: this changes query-less subjects like /X/EUR%2FUSD to yield
EUR/USD instead of EUR%2FUSD.
- Expose a shared CHARSET constant; DataSourceServerBootstrap sources
its bootstrapCharset from it.
reactive DSL:
- Thread the parsed query map to all supplier shapes via a Request /
ChannelRequest object (path, pathVariables, queryParameters[, receive])
instead of positional params, avoiding the same-typed adjacent-map
footgun and making future additions non-breaking.
- RequestSupplier / ChannelRequestSupplier are receiver-style SAMs, so
Kotlin gets `{ this.path }` ergonomics with no overload ambiguity while
Java implements a clean `invoke(request)`.
- Retain the previous positional shapes as @deprecated PathVariablesSupplier
/ PathVariablesChannelSupplier overloads for source back-compat.
Public API: additive to util; the reactive supplier interfaces are
reshaped (deprecated overloads retained) — a major bump. .api snapshots
regenerated.
1 parent 5b1e75d commit 2c55200
24 files changed
Lines changed: 676 additions & 83 deletions
File tree
- buildSrc/src/main/kotlin
- reactive
- api
- api
- src/main/kotlin/com/caplin/integration/datasourcex/reactive/api
- core/src/main/kotlin/com/caplin/integration/datasourcex/reactive/core
- java-flow
- api
- src/samples/kotlin/samples
- kotlin
- api
- src
- samples/kotlin/samples
- test/kotlin/com/caplin/integration/datasourcex/reactive/kotlin
- reactivestreams
- api
- src/samples/kotlin/samples
- spring/src/main/kotlin/com/caplin/integration/datasourcex/spring/internal
- util
- api
- src
- main/kotlin/com/caplin/integration/datasourcex/util
- test/kotlin/com/caplin/integration/datasourcex/util
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
| 75 | + | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| |||
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
104 | 167 | | |
105 | 168 | | |
106 | 169 | | |
| |||
112 | 175 | | |
113 | 176 | | |
114 | 177 | | |
115 | | - | |
| 178 | + | |
116 | 179 | | |
117 | 180 | | |
118 | 181 | | |
| |||
151 | 214 | | |
152 | 215 | | |
153 | 216 | | |
| 217 | + | |
154 | 218 | | |
| 219 | + | |
155 | 220 | | |
156 | 221 | | |
157 | 222 | | |
| |||
169 | 234 | | |
170 | 235 | | |
171 | 236 | | |
172 | | - | |
| 237 | + | |
173 | 238 | | |
174 | | - | |
| 239 | + | |
175 | 240 | | |
176 | 241 | | |
177 | 242 | | |
178 | 243 | | |
179 | | - | |
| 244 | + | |
180 | 245 | | |
181 | 246 | | |
182 | 247 | | |
| |||
186 | 251 | | |
187 | 252 | | |
188 | 253 | | |
189 | | - | |
| 254 | + | |
190 | 255 | | |
191 | 256 | | |
192 | 257 | | |
| |||
210 | 275 | | |
211 | 276 | | |
212 | 277 | | |
213 | | - | |
| 278 | + | |
214 | 279 | | |
215 | | - | |
| 280 | + | |
216 | 281 | | |
217 | 282 | | |
218 | 283 | | |
219 | 284 | | |
220 | | - | |
| 285 | + | |
221 | 286 | | |
222 | 287 | | |
223 | 288 | | |
224 | 289 | | |
225 | 290 | | |
226 | 291 | | |
227 | | - | |
| 292 | + | |
228 | 293 | | |
229 | 294 | | |
230 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
| |||
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
96 | 159 | | |
97 | 160 | | |
98 | 161 | | |
| |||
103 | 166 | | |
104 | 167 | | |
105 | 168 | | |
106 | | - | |
| 169 | + | |
107 | 170 | | |
108 | 171 | | |
109 | 172 | | |
| |||
142 | 205 | | |
143 | 206 | | |
144 | 207 | | |
| 208 | + | |
145 | 209 | | |
| 210 | + | |
146 | 211 | | |
147 | 212 | | |
148 | 213 | | |
| |||
0 commit comments