Commit 1b37e5f
committed
Bump version to 1.0.4 and improve server lifecycle management
Version Updates:
- Bump module version from 1.0.3 to 1.0.4
- Upgrade tinystruct dependency from 1.7.10 to 1.7.12
- Upgrade central-publishing-maven-plugin from 0.7.0 to 0.8.0
Server Lifecycle Improvements:
- Add proper shutdown hook registration before server start
- Store ChannelFuture as instance variable for proper cleanup
- Improve stop() method with channel close synchronization
- Remove redundant shutdown hook and finally block
- Disable template requirement in init()
SSL Configuration Enhancement:
- Extract SSL configuration to dedicated configureSsl() method
- Add support for custom SSL certificates via configuration
- Read certificate/key paths from settings (ssl.certificate.path, ssl.key.path)
- Fall back to self-signed certificate with warning if paths not provided
- Add logging for production SSL configuration recommendations
Bug Fixes:
- Fix SSE Content-Type header from invalid "text/event-stream, application/json"
to proper "text/event-stream; charset=utf-8"
- Simplify exceptionCaught() method signature by removing Context parameter
Code Quality:
- Add missing File import
- Improve error handling in channel close with InterruptedException handling
- Better separation of concerns with SSL configuration extraction1 parent 9d42cf1 commit 1b37e5f
File tree
3 files changed
+53
-20
lines changed- src/main/java/org/tinystruct
- handler
- system
3 files changed
+53
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
Lines changed: 49 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
87 | | - | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
132 | 140 | | |
133 | 141 | | |
134 | 142 | | |
| |||
156 | 164 | | |
157 | 165 | | |
158 | 166 | | |
159 | | - | |
160 | | - | |
| 167 | + | |
161 | 168 | | |
162 | 169 | | |
163 | 170 | | |
| |||
190 | 197 | | |
191 | 198 | | |
192 | 199 | | |
193 | | - | |
| 200 | + | |
194 | 201 | | |
195 | 202 | | |
196 | 203 | | |
| |||
200 | 207 | | |
201 | 208 | | |
202 | 209 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
213 | | - | |
214 | | - | |
215 | 214 | | |
216 | 215 | | |
217 | 216 | | |
218 | 217 | | |
219 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
220 | 230 | | |
221 | 231 | | |
222 | 232 | | |
223 | 233 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
228 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
229 | 262 | | |
230 | 263 | | |
231 | 264 | | |
| |||
0 commit comments