* Why have a separate setTimeoutHandler() method? Why not just create
and register a TimeoutCallback?
* register() returns a boolean in some instances and AsyncResponse in
others and the javadoc is off. IMO, you don't need a boolean return
value , instead throw an UnsupportedOperationException or something.
* If anything, ResumeCallback happens before response is sent, isn't
this what a ContainerResponseFilter already does? Also, how could
ResumeCallback modify the response? Call AsyncResponse.resume()? If
so, how can you avoid an infinite loop? I question all this behavior.
* I don't like the current behavior of ResumeCallback and think it
should be removed.
* I think we should have similar Servlet 3.0 callbacks.
CompletionCallback
OnErrorCallback
TimeoutCallback
OnComplete and OnError callbacks are very interesting. Consider the
case where you only want to commit a transaction if the response was
sent to the client and want to rollback if it wasn't. ResumeCallback
doesn't handle either of those.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com