https://linen.dev logo
#wiremock-java
Title
# wiremock-java
t

Tom

06/14/2023, 2:25 PM
I’ve posted some comments on how we might improve extensions in 3.x and some design options. Would appreciate thoughts on https://github.com/wiremock/wiremock/issues/1512#issuecomment-1591286748 and below comments.
👍 1
o

Oleg Nenashev

06/14/2023, 3:45 PM
FYI @Bas Dijkstra
👀 1
b

Bas Dijkstra

06/15/2023, 7:05 AM
Added a couple of questions. They might make sense, they might not.
d

Dirk Bolte

06/23/2023, 10:07 AM
adapted one of extension to this branch. Replacing the
PostServeAction
was straight forward: https://github.com/dirkbolte/wiremock-extension-state/tree/feature/use-new-extension-model
🙌 1
o

Oleg Nenashev

06/23/2023, 10:09 AM
Nice!
d

Dirk Bolte

06/23/2023, 10:28 AM
for implementations of multiple events, I wonder we need a differentiation. The same listener would react on multiple events but we cannot separate the parameters per event yet.
t

Tom

06/23/2023, 10:56 AM
I think you could solve this by creating separate listener classes that just implement one of the callback methods (this is why they’ve all got default empty impls).
Unless I’m misunderstanding the problem?
d

Dirk Bolte

06/23/2023, 11:34 AM
we could but it would require the user to register multiple extensions. So if you have one extension that should offer a similar functionality for multiple cut points, you end up registering all of them. I wonder implementing multiple listeners in one class isn't ideal, whether we shouldn't split up the interface anyhow - also from an interface segregation point of view. The extension implementer can still decide to have one class implement all of them.