Hello

Sorry for late response. To be honest - this will look differently in Pax
Web 8, because I'm rewriting the configuration aspects of Pax Web.
Handlers are Jetty specific and I'm afraid that for now you have to dig in
the code yourself (I've never used this mechanism of OSGi-registration of
Jetty handlers/handlerWrappers).

Handlers are processed in this place:
https://github.com/ops4j/org.ops4j.pax.web/blob/pax-web-7.3.x/pax-web-jetty/src/main/java/org/ops4j/pax/web/service/jetty/internal/Activator.java#L142
and then added to Jetty itself here:
https://github.com/ops4j/org.ops4j.pax.web/blob/pax-web-7.3.x/pax-web-jetty/src/main/java/org/ops4j/pax/web/service/jetty/internal/ServerControllerFactoryImpl.java#L101

And you're right - for now if you need a handler *wrapper* you need an
instance of the handler being wrapped - the existing
org.ops4j.pax.web.itest.jetty.JettyHandlerServiceIntegrationTest test
simply ADDS different handler that's invoked AFTER (not AROUND) existing
Pax Web provided one...

Indeed - I'll remember that ability to install real wrappers (same for
Tomcat valves and Undertow handlers) would be great-to-have in Pax Web 8.

regards
Grzegorz Grzybek

śr., 17 lut 2021 o 13:54 Alain Picard <[email protected]>
napisał(a):

>
> Hi,
>
> I searched and found the group talk and issue
> <https://ops4j1.jira.com/browse/PAXWEB-1189> regarding support for
> GZipHandler but this seems to rely on using a jetty.xml file.
>
> How can I do it programmatically since this is not just a regular Handler
> but a HandlerWrapper that needs to have it's handler set and I can't seem
> to be able to get such a reference to pass it back when attempting to
> register it as a service.
>
> Cheers,
> Alain
>
> --
> --
> ------------------
> OPS4J - http://www.ops4j.org - [email protected]
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ops4j/49b02792-d1a2-473d-8ba6-d4b05eb4ba0dn%40googlegroups.com
> <https://groups.google.com/d/msgid/ops4j/49b02792-d1a2-473d-8ba6-d4b05eb4ba0dn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ops4j/CAAdXmhq3v2R3b1-UgEUTYy%2BdGDr-aBfKYP_YXhMFdYo1n5SEsQ%40mail.gmail.com.

Reply via email to