<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 17, 2013 at 2:19 PM, Matthias Wessendorf <span dir="ltr"><<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Thu, Oct 17, 2013 at 1:21 PM, Sebastien Blanc <span dir="ltr"><<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">So I started to look more closely to this, and I'm wondering how we want the Callback to be. I see 2 options that are described here : <a href="https://gist.github.com/sebastienblanc/7023151" target="_blank">https://gist.github.com/sebastienblanc/7023151</a><div>
<br></div><div>Basically, version 1 has a 'completed' method which will be invoked no matter which http status code is returned, the developer has than to implement it's own logic of handling the status. The 'failure' method will be invoked in case of an exception is thrown (IOException for instance)</div>
</div></blockquote><div><br></div></div><div>Similar to what the JAX-RS 2.0 client lib does:</div><div><a href="https://jersey.java.net/documentation/latest/async.html#d0e7394" target="_blank">https://jersey.java.net/documentation/latest/async.html#d0e7394</a><br>
</div><div><br></div><div>Will this 'dramatically' change our call as well (e.g. async nature?)</div></div></div></div></blockquote><div><br></div><div style>Nope, both options have no big impact. </div><div style>
But speaking of that, I plan to keep the old merthod send(UnifiedMessage message), the dev can choose just a fire&forget or with callback ? wdyt ?</div><div style> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="HOEnZb"><font color="#888888"><div><br></div><div>-M</div></font></span><div><div class="h5"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div><br></div><div>Version 2 has a 'onSuccess' method which handles the 2xx response codes and a 'onError' which handles 4xx, 5xx codes or even if an exception has occurred.</div><div><br></div><div>
Do you have any preference or even an alternative solution ?</div><div><br></div><div>Seb</div><div><br></div><div><br></div><div><br><div><br></div></div></div><div><div><div class="gmail_extra"><br>
<br><div class="gmail_quote">
On Tue, Oct 8, 2013 at 3:14 PM, Sebastien Blanc <span dir="ltr"><<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">FYI Karel has created a Jira for this <a href="https://issues.jboss.org/browse/AGPUSH-373" target="_blank">https://issues.jboss.org/browse/AGPUSH-373</a><div><br></div></div><div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Sep 24, 2013 at 11:43 AM, Karel Piwko <span dir="ltr"><<a href="mailto:kpiwko@redhat.com" target="_blank">kpiwko@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On Thu, 19 Sep 2013 10:13:52 -0400<br>
<div><div>Summers Pittman <<a href="mailto:supittma@redhat.com" target="_blank">supittma@redhat.com</a>> wrote:<br>
<br>
> On 09/18/2013 09:37 AM, Karel Piwko wrote:<br>
> > On Wed, 18 Sep 2013 09:31:36 -0400<br>
> > Summers Pittman <<a href="mailto:supittma@redhat.com" target="_blank">supittma@redhat.com</a>> wrote:<br>
> ><br>
> >> On 09/17/2013 11:17 AM, Karel Piwko wrote:<br>
> >>> Hi,<br>
> >>><br>
> >>> I went once again through<br>
> >>> <a href="http://lists.jboss.org/pipermail/aerogear-dev/2013-June/002901.html" target="_blank">http://lists.jboss.org/pipermail/aerogear-dev/2013-June/002901.html</a> -<br>
> >>> which says that Sender API should be fire&forget. It feels more like<br>
> >>> "maybe fire"&forget, for instance it does not say that your credentials<br>
> >>> were wrong<br>
> >>> - or it says, you need parse logs to get that information.<br>
> >>><br>
> >>> If I think about Android, iOS, JS solutions to communicate with<br>
> >>> UnifiedPush we provide - Pipes - they always provide a callback to be<br>
> >>> executed on success/failure. Could we add callback to Sender API? Or<br>
> >>> should not Aerogear rather have something like Pipes abstraction for Java<br>
> >>> developers instead of pretty dumb Sender API?<br>
> >>><br>
> >>> Thoughts?<br>
> >> In a bit of crazy land perhaps the client could keep a web socket or BSD<br>
> >> Socket open to the server which would let it get callbacks about things<br>
> >> that happen further down the tree.<br>
> > Isn't this land called vert.x?<br>
> Maybe I misunderstood. I thought it was wanting to get information from<br>
> the push server about the status of messages being sent not the response<br>
> of the commands to the push server itself.<br>
<br>
</div></div>I was speaking about the latter.<br>
<div><div><br>
> ><br>
> >>> Thanks,<br>
> >>><br>
> >>> Karel<br>
> >>> _______________________________________________<br>
> >>> aerogear-dev mailing list<br>
> >>> <a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
> >>> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
> >> _______________________________________________<br>
> >> aerogear-dev mailing list<br>
> >> <a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
> >> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
> > _______________________________________________<br>
> > aerogear-dev mailing list<br>
> > <a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
> > <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
><br>
> _______________________________________________<br>
> aerogear-dev mailing list<br>
> <a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div></div></div><br><br clear="all"><div class="im"><div><br></div>
-- <br>Matthias Wessendorf <br>
<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div></div>
<br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div></div>