Commit 9463751
Router refactor to beanfactory (#2514)
* refactor: move globalInterceptor to beanFactory
* refactor: streamline exception messages, improve logging, and enhance Javadoc comments across classes
* feat: global interceptor support for YAML
* refactor: streamline imports, remove unused methods, and improve exception formatting in `Router`
* refactor: remove unused `setRouter` method from `Transport` and enhance Javadoc for `Router` settings
* refactor: remove unused imports, simplify package structure, and clean up redundant code in YAML integration
* refactor: remove unused imports, simplify package structure, and clean up redundant code in YAML integration
* refactor: extend and streamline BeanRegistry integration in Router, improve exception formatting, enhance concurrency handling
* refactor: streamline imports in `GenericYamlParserTest`, improve readability and maintainability
* refactor: simplify `registerIfAbsent` usage in `Router` and `BeanRegistry`, streamline bean registration logic
* refactor: simplify `registerIfAbsent` by removing `name` parameter, streamline bean registration
* refactor: remove duplicate `openPorts` field from `Router`
* refactor: enhance concurrency handling in `BeanRegistryImplementation`, improve logging and null checks, and streamline `activationRun` logic
* refactor: replace `Router.init` with `Router.initByXML`, improve thread-safety in `BeanContainer`, and streamline `BeanRegistry` handling
* refactor: remove redundant `Exception` declarations, simplify `tearDown` and `setUp` methods, and clean up `BeanContainer` by removing unused `setIfAbsent` method
* refactor: simplify Router lifecycle methods, streamline test setup/teardown logic, and remove unused classes
* refactor: streamline imports in test files and remove redundant `Exception` declarations
* refactor: improve thread-safety in `registerIfAbsent` by introducing dedicated lock
* refactor: update test lifecycle methods to use `@BeforeAll`/`@AfterAll`, remove redundant assertions, and improve object reuse
* refactor: refactor `Router` lifecycle methods, remove `openPorts` handling, improve proxy addition & initialization logic
* refactor: streamline imports, remove redundant declarations, and improve readability in test files
* refactor: improve Router lifecycle management, update test setup/teardown methods, and streamline imports across test cases
* refactor: replace `Router.initByXML` with `RouterBootstrap.initByXML`, improve HotDeployer lifecycle, and streamline `Router` initialization logic
* refactor: make `router` field `final` in `RuleReinitializer` to ensure immutability and improve thread-safety
* refactor: improve `Router` lifecycle methods, enhance thread-safety, and streamline `RuleReinitializer` logic
* refactor: remove unnecessary `Exception` declaration from `initOasi` method in test file
* refactor: enhance `Router` lifecycle handling, improve thread-safety, and update test setup/teardown methods
* refactor: add TODO for replacing `backgroundInitializer` with virtual threads in `Router` to align with modern threading practices
* refactor: replace `Router` with `HttpRouter` in test files and update initialization logic for consistency
* refactor: improve thread-safety in `DefaultHotDeployer`, enhance logging, and fix `BeanContainer` string formatting
* refactor: replace `Router` with `IRouter` for better abstraction and consistency across core components
* refactor: introduce `AbstractRouter` for shared functionality, replace `Router` with `IRouter` or specialized implementations, and align tests accordingly
* refactor: remove `IRouter` interface, replace with `DefaultRouter` or specialized implementations, and align related components and tests
* refactor: replace `router.getConfig()` with `router.getConfiguration()` for improved naming consistency across core components and tests
* refactor: replace `router.shutdown()` with `router.stop()` and introduce `DefaultMainComponents` to streamline router initialization and component management
* refactor: improve thread-safety and synchronization in `BeanRegistryImplementation`, enhance initialization/logging in routers, and remove unused/deprecated methods
* refactor: extend timeout in `MassivelyParallelTest` to improve test stability under high load
* improved synchronization
* doc
* small improvements
---------
Co-authored-by: Christian Gördes <118011644+christiangoerdes@users.noreply.github.com>
Co-authored-by: Tobias Polley <mail@tobias-polley.de>1 parent a5ecc1b commit 9463751
323 files changed
Lines changed: 3787 additions & 3266 deletions
File tree
- annot/src/main/java/com/predic8/membrane/annot/beanregistry
- core/src
- main/java/com/predic8/membrane/core
- cli
- exchangestore
- interceptor
- acl
- administration
- antivirus
- apikey
- extractors
- stores
- authentication
- session
- balancer
- faultmonitoring
- cache
- flow
- choice
- formvalidation
- javascript
- json
- jwt
- kubernetes
- lang
- ntlm
- oauth2client
- rf
- oauth2server
- oauth2
- authorizationservice
- tokengenerators
- tokenvalidation
- ratelimit
- registration
- rest
- rewrite
- schemavalidation
- server
- session
- soap
- statistics
- stomp
- templating
- ws_addressing
- xmlcontentfilter
- xmlprotection
- xml
- xslt
- jmx
- kubernetes
- lang
- openapi/serviceproxy
- proxies
- resolver
- router/hotdeploy
- sslinterceptor
- transport
- http2
- http
- ssl
- ws
- interceptors
- util
- jdbc
- test
- java/com/predic8/membrane
- core
- acl
- azure
- config
- exchangestore
- graphql
- http
- interceptor
- acl
- adminapi
- apikey
- stores
- authentication
- balancer
- flow
- invocation
- internalservice
- formvalidation
- groovy
- javascript
- json
- jwt
- lang
- oauth2
- authorizationservice
- client
- b2c
- opentelemetry
- rewrite
- schemavalidation
- server
- session
- shadowing
- soap
- templating
- tunnel
- xmlprotection
- xml
- xslt
- kubernetes
- client
- lang
- jsonpath
- xpath
- openapi
- serviceproxy
- validators/security
- proxies
- resolver
- security
- transport
- http2
- http
- client
- ssl
- acme
- ws
- evaluation
- integration
- withinternet
- interceptor
- withoutinternet
- interceptor
- oauth2
- interceptor
- ws_addressing
- resources
- distribution/src/test/java/com/predic8/membrane
- examples
- withinternet
- env
- test
- withoutinternet/test
- load
- docs
- war/src/main/java/com/predic8/membrane/servlet
- embedded
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 80 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
| 26 | + | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
21 | 31 | | |
22 | | - | |
| 32 | + | |
23 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
24 | 37 | | |
25 | 38 | | |
26 | 39 | | |
27 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
28 | 48 | | |
29 | | - | |
30 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
31 | 55 | | |
32 | 56 | | |
33 | | - | |
34 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
35 | 63 | | |
36 | 64 | | |
37 | 65 | | |
| |||
40 | 68 | | |
41 | 69 | | |
42 | 70 | | |
43 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
44 | 117 | | |
| 118 | + | |
45 | 119 | | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| 82 | + | |
| 83 | + | |
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
47 | 59 | | |
Lines changed: 65 additions & 56 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
20 | 19 | | |
21 | | - | |
22 | | - | |
| 20 | + | |
23 | 21 | | |
| 22 | + | |
24 | 23 | | |
25 | | - | |
26 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
27 | 39 | | |
28 | 40 | | |
29 | 41 | | |
| |||
36 | 48 | | |
37 | 49 | | |
38 | 50 | | |
| 51 | + | |
| 52 | + | |
39 | 53 | | |
40 | 54 | | |
41 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
42 | 62 | | |
43 | 63 | | |
44 | 64 | | |
45 | 65 | | |
46 | 66 | | |
47 | 67 | | |
48 | 68 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
89 | 94 | | |
90 | 95 | | |
91 | 96 | | |
92 | | - | |
93 | | - | |
| 97 | + | |
94 | 98 | | |
95 | | - | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| |||
121 | 125 | | |
122 | 126 | | |
123 | 127 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 128 | + | |
137 | 129 | | |
138 | 130 | | |
139 | 131 | | |
| |||
143 | 135 | | |
144 | 136 | | |
145 | 137 | | |
146 | | - | |
| 138 | + | |
147 | 139 | | |
148 | 140 | | |
149 | 141 | | |
| |||
153 | 145 | | |
154 | 146 | | |
155 | 147 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | 148 | | |
166 | 149 | | |
167 | 150 | | |
168 | | - | |
| 151 | + | |
169 | 152 | | |
170 | 153 | | |
171 | 154 | | |
| |||
175 | 158 | | |
176 | 159 | | |
177 | 160 | | |
178 | | - | |
| 161 | + | |
179 | 162 | | |
180 | 163 | | |
181 | 164 | | |
182 | 165 | | |
183 | 166 | | |
184 | 167 | | |
185 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
186 | 172 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
191 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
192 | 201 | | |
Lines changed: 31 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 | + | |
| 30 | + | |
| 31 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
0 commit comments