<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.6.4">
</HEAD>
<BODY>
+ 1 on letting the client decide what status is considered as success (version 1)<BR>
<BR>
On Thu, 2013-10-17 at 13:21 +0200, Sebastien Blanc wrote:
<BLOCKQUOTE TYPE=CITE>
    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 :&nbsp;<A HREF="https://gist.github.com/sebastienblanc/7023151">https://gist.github.com/sebastienblanc/7023151</A>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Basically, version 1 has a 'completed' method which will be invoked no matter which http status code is returned, the&nbsp;developer&nbsp;has than to implement it's own logic of handling the status. The 'failure' method will be invoked &nbsp;in case of an exception is thrown (IOException for instance)
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    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&nbsp;occurred.
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Do you have any preference or even an alternative solution ?
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Seb
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    On Tue, Oct 8, 2013 at 3:14 PM, Sebastien Blanc &lt;<A HREF="mailto:scm.blanc@gmail.com">scm.blanc@gmail.com</A>&gt; wrote:
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        FYI Karel has created a Jira for this&nbsp;<A HREF="https://issues.jboss.org/browse/AGPUSH-373">https://issues.jboss.org/browse/AGPUSH-373</A>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        On Tue, Sep 24, 2013 at 11:43 AM, Karel Piwko &lt;<A HREF="mailto:kpiwko@redhat.com">kpiwko@redhat.com</A>&gt; wrote:<BR>
        <BLOCKQUOTE>
            On Thu, 19 Sep 2013 10:13:52 -0400
        </BLOCKQUOTE>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BLOCKQUOTE>
            Summers Pittman &lt;<A HREF="mailto:supittma@redhat.com">supittma@redhat.com</A>&gt; wrote:<BR>
            <BR>
            &gt; On 09/18/2013 09:37 AM, Karel Piwko wrote:<BR>
            &gt; &gt; On Wed, 18 Sep 2013 09:31:36 -0400<BR>
            &gt; &gt; Summers Pittman &lt;<A HREF="mailto:supittma@redhat.com">supittma@redhat.com</A>&gt; wrote:<BR>
            &gt; &gt;<BR>
            &gt; &gt;&gt; On 09/17/2013 11:17 AM, Karel Piwko wrote:<BR>
            &gt; &gt;&gt;&gt; Hi,<BR>
            &gt; &gt;&gt;&gt;<BR>
            &gt; &gt;&gt;&gt; I went once again through<BR>
            &gt; &gt;&gt;&gt; <A HREF="http://lists.jboss.org/pipermail/aerogear-dev/2013-June/002901.html">http://lists.jboss.org/pipermail/aerogear-dev/2013-June/002901.html</A> -<BR>
            &gt; &gt;&gt;&gt; which says that Sender API should be fire&amp;forget. It feels more like<BR>
            &gt; &gt;&gt;&gt; &quot;maybe fire&quot;&amp;forget, for instance it does not say that your credentials<BR>
            &gt; &gt;&gt;&gt; were wrong<BR>
            &gt; &gt;&gt;&gt; - or it says, you need parse logs to get that information.<BR>
            &gt; &gt;&gt;&gt;<BR>
            &gt; &gt;&gt;&gt; If I think about Android, iOS, JS solutions to communicate with<BR>
            &gt; &gt;&gt;&gt; UnifiedPush we provide - Pipes - they always provide a callback to be<BR>
            &gt; &gt;&gt;&gt; executed on success/failure. Could we add callback to Sender API? Or<BR>
            &gt; &gt;&gt;&gt; should not Aerogear rather have something like Pipes abstraction for Java<BR>
            &gt; &gt;&gt;&gt; developers instead of pretty dumb Sender API?<BR>
            &gt; &gt;&gt;&gt;<BR>
            &gt; &gt;&gt;&gt; Thoughts?<BR>
            &gt; &gt;&gt; In a bit of crazy land perhaps the client could keep a web socket or BSD<BR>
            &gt; &gt;&gt; Socket open to the server which would let it get callbacks about things<BR>
            &gt; &gt;&gt; that happen further down the tree.<BR>
            &gt; &gt; Isn't this land called vert.x?<BR>
            &gt; Maybe I misunderstood. &nbsp;I thought it was wanting to get information from<BR>
            &gt; the push server about the status of messages being sent not the response<BR>
            &gt; of the commands to the push server itself.<BR>
            <BR>
            <BR>
        </BLOCKQUOTE>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BLOCKQUOTE>
            I was speaking about the latter.
        </BLOCKQUOTE>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BLOCKQUOTE>
            <BR>
            &gt; &gt;<BR>
            &gt; &gt;&gt;&gt; Thanks,<BR>
            &gt; &gt;&gt;&gt;<BR>
            &gt; &gt;&gt;&gt; Karel<BR>
            &gt; &gt;&gt;&gt; _______________________________________________<BR>
            &gt; &gt;&gt;&gt; aerogear-dev mailing list<BR>
            &gt; &gt;&gt;&gt; <A HREF="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</A><BR>
            &gt; &gt;&gt;&gt; <A HREF="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</A><BR>
            &gt; &gt;&gt; _______________________________________________<BR>
            &gt; &gt;&gt; aerogear-dev mailing list<BR>
            &gt; &gt;&gt; <A HREF="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</A><BR>
            &gt; &gt;&gt; <A HREF="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</A><BR>
            &gt; &gt; _______________________________________________<BR>
            &gt; &gt; aerogear-dev mailing list<BR>
            &gt; &gt; <A HREF="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</A><BR>
            &gt; &gt; <A HREF="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</A><BR>
            &gt;<BR>
            &gt; _______________________________________________<BR>
            &gt; aerogear-dev mailing list<BR>
            &gt; <A HREF="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</A><BR>
            &gt; <A HREF="https://lists.jboss.org/mailman/listinfo/aerogear-dev">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">aerogear-dev@lists.jboss.org</A><BR>
            <A HREF="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</A><BR>
            <BR>
        </BLOCKQUOTE>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<PRE>
_______________________________________________
aerogear-dev mailing list
<A HREF="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</A>
<A HREF="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</A>
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>