users@servlet-spec.java.net

[servlet-spec users] Re: One more clarification

From: Greg Wilkins <gregw_at_intalio.com>
Date: Wed, 4 Jul 2012 14:46:46 +0200

Filip,

I think the idea is that these APIs also work with the upgrade mechanism.

But I generally agree that they really should be associated with
startAsync. Perhaps if you want an async upgrade you do a startAsync
and then trigger the upgrade mechanism.... I'll have to refresh my
brain about how the upgrade is intended to work.

cheers




On 4 July 2012 00:02, Filip Hanik (mailing lists) <devlists_at_hanik.com> wrote:
> I'm struggling a bit with the ideas of these callback methods, and I think
> it's a simple matter of clarification.
>
> When would these methods ever be called unless there is an AsyncContext
> going on for that request? (meaning thread has been detached from
> request/response)?
>
> Ie, should setReadListener(....) throw IllegalStateException unless there is
> an AsyncContext ?
> Same for setWriteListener
>
> Ie, it doesn't make sense to have a call back if I'm already using up a
> thread
> for a request, and the only way to not have that thread is by having an
> Async servlet
>
> Best
> Filip
>
>
>



-- 
Greg Wilkins <gregw_at_intalio.com>
www.webtide.com
Developer advice, services and support
from the Jetty & CometD experts.