There are a few approaches here, you can either use a ServletExtension
register a handler that can do this.
Servlet 3.1 also now provides a standard way to do this using the
upgrade listener that should be portable amongst all servlet 3.1 containers.
Dino Tsoumakis wrote:
I’m currently migrating Glassfish-based Products to Widfly 8.1. I used
Grizzly-based Port Unification to tunnel MQTT-Protocol over SSL on
Glassfish. Now I switched to Wildfly and I would love to switch the
port unification from grizzly to undertow, too. I know there are
similar concepts for doing this, but I do not know which way is the
best using undertow. On Glassfish I simply start an embedded grizzly
for SSL and implemented special handlers for splitting HTTP protocol
from MQTT. I know it is possible to use undertow’s builder API, add a
listener and write a custom handler for it. Is this the preferred way
to do that? Or is there a possibility to simply register a custom
handler implementation without starting a separat embedded server. I
have a complete wildfly instance running anyway. That way it would be
easier to use the already configured SSL stuff (like configured realm,
BTW: It would be possible to contribute this code.
undertow-dev mailing list