-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jetty-12, replacement for HttpChannel.Listener #8885
Comments
The Listener mechanism doesn't really encourage mucking with the exchange, it's more about announcing certain lifecycle events in the exchange. IMO, A wrapper approach would be just encouraging all kinds of shenanigans that are not in the right place. |
Good points. So the combined approach would have a pure listener (incapable of significant or easy shenanigans (yeah I know... where there is a will ....)) and that only if we register such a listener on the connector, would a stream wrapper be installed to collect events for it. If you want to manipulate a request, then a handler is the way to do that. |
Is this still on the agenda? I was just going through the |
I'd keep it around as it would be nice to have a single event listener and hiding all the wrappings. |
After some discussion with @lorban and @sbordet, we are now doubtful that a listener interface is really needed and that the benefits can be achieved by:
So this #9754 and #9872 should be put on hold whilst we verify this is true. Meanwhile, some more observations from the discussion about the mechanisms proposed in #9754:
|
The stream vs network view is interesting, but ultimately not what most people that use the historical Metric style events that people want to know about (and we've gotten questions for, and have helped other open source projects with)
The order of usefulness to most people.
|
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
* #8885 add EventsHandler API Signed-off-by: Ludovic Orban <[email protected]>
Jetty version(s)
Jetty-12
Enhancement Description
In Jetty-9/10/11 A
HttpChannel.Listener
can be added as a bean to anAbstractConnector
and then efficiently retrieved in the constructor of everyHttpChannel
.Jetty-12 has good interception points (not least with
HttpStream
wrappers), but has no similar convenience method for installing them. Instead a handler needs to be used to install a stream wrapper on every request.We could either revive a listener mechanism in 12, or perhaps instead add a method that would allow a bean added to a connector to efficiently wrap every
HttpStream
? Or perhaps a combination of both, i.e. a stream wrapper that invokes a new listener?The text was updated successfully, but these errors were encountered: