<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 10, 2014 at 6:01 PM, Douglas Campos <span dir="ltr">&lt;<a href="mailto:qmx@qmx.me" target="_blank">qmx@qmx.me</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, Nov 08, 2014 at 01:59:31PM +0100, Sebastien Blanc wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; Currently in the Java Sender Library the pushApplicationId and the<br>
&gt; masterSecret are part of the UnifiedPushMessage object. I would like to<br>
&gt; move these 2 fields to the Sender object and add it to its Builder API, to<br>
&gt; have something like :<br>
&gt;<br>
&gt; JavaSender defaultJavaSender = new<br>
&gt; SenderClient.Builder(&quot;<a href="http://localhost:8080/ag-push" target="_blank">http://localhost:8080/ag-push</a>&quot;)<br>
&gt;                 .pushApplicationId(&quot;c7fc6525-5506-4ca9-9cf1-55cc261ddb9c&quot;)<br>
&gt;                 .masterSecret(&quot;8b2f43a9-23c8-44fe-bee9-d6b0af9e316b&quot;)<br>
&gt;                 .build();<br>
&gt;<br>
&gt;<br>
&gt; Why ?<br>
&gt;<br>
</span>&gt;    - Regarding design, these 2 fields are more part of the sender rather<br>
&gt;    than the message itself<br>
&gt;    - This is a first step to externalize the configuration, so we could<br>
<span class="">&gt;    have later, for instance, `JavaSender defaultJavaSender = new<br>
&gt;    SenderClient.Config(&quot;path.to.config(or resource stream&quot;)<br>
</span>I&#39;m assuming a new Whatever.Config() will yield a Config instance, so<br>
this looks wrong.<br></blockquote><div>Yeah wrong naming, Dan come already with something better Sender.withConfig(....)  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
&gt;<br>
&gt; What does it change ?<br>
&gt;<br>
</span>&gt;    - It only concerns the Java Sender, we do not touch the Rest Sender API<br>
&gt;    here.<br>
&gt;    - A Sender instance is now bounded to a particular PushApp, so if we<br>
<span class="">&gt;    want to send a message to another PushApp we should :<br>
</span>&gt;    -   Create a new instance of the Sender<br>
&gt;    -   Expose setters to update the config.<br>
&gt;<br>
&gt; So , wdyt ?<br>
<span class="im HOEnZb"><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" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br>
<br>
</span><span class="HOEnZb"><font color="#888888">--<br>
qmx<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div></div>