[aerogear-dev] "cancel" method on Pipe

Kris Borchers kris at redhat.com
Thu Feb 14 12:18:48 EST 2013


On Feb 14, 2013, at 11:08 AM, Summers Pittman <supittma at redhat.com> wrote:

> On 02/14/2013 02:31 AM, Matthias Wessendorf wrote:
>> On Mon, Feb 11, 2013 at 4:12 PM, Summers Pittman <supittma at redhat.com> wrote:
>>> We have three JIRA's[1] to add a cancel method to Pipe.
>>> 
>>> In Android (and presumably iOS and to a lesser extent JS) Pipes are shared
>>> among multiple threads and each request exists in its own scope.  (IE
>>> multiple threads can have multiple requests running at one time).
>>> 
>>> When a "cancel" is called, which request is cancelled?
>> When calling cancel on a pipe, I'd assume that all enqueued/running
>> requests, for that particular pipe, are canceled.
> -.15
> 
> I don't like it but 99% of the time there will only be one call in the 
> Pipe.
> What happens on the callbacks?  I would assume either onError would be 
> called with an appropriate object/message(+1) or we add an onCancel 
> method(-1).

The JS(jQuery via .abort()) way is it will fire the error callback with a textStatus of "abort" (which is inline with your +1) and it also fires the complete callback, again with a textStatus of "abort", which is fired after any request whether it's success or error but is not required.
> 
> Summers
>> 
>> -Matthias
>> 
>> 
>>>  I've attempted to address this (and some larger issues) here:
>>> https://github.com/aerogear/aerogear.org/blob/pipe_spec/docs/specs/aerogear-client-pipe/index.markdown
>>> 
>>> 
>>> Summers
>>> 
>>> 1: (898,901,895)
>>> 
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> aerogear-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>> 
>> 
> 
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev




More information about the aerogear-dev mailing list