[undertow-dev] exchange.dispatch() deprecation - safe to ignore?

Michael Hixson michael.hixson at gmail.com
Fri Sep 23 00:30:17 EDT 2016


Hello,

I'm using the no-argument version of HttpServerExchange.dispatch(),
and I just noticed that it's deprecated.

I'm using dispatch() to suspend the exchange, to make sure the
exchange isn't completed when the call stack returns.  Basically I'm
telling it, "Go to sleep.  I'll be back later to finish things."

Is that an inappropriate use of dispatch()?

It's not clear that the suggested alternative of
dispatch(Executor,Runnable) is better in this case.  What arguments
would I provide?  dispatch(null, () -> {}) ?

-Michael


More information about the undertow-dev mailing list