<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"><<a href="mailto:qmx@qmx.me" target="_blank">qmx@qmx.me</a>></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>
> Hi,<br>
><br>
> Currently in the Java Sender Library the pushApplicationId and the<br>
> masterSecret are part of the UnifiedPushMessage object. I would like to<br>
> move these 2 fields to the Sender object and add it to its Builder API, to<br>
> have something like :<br>
><br>
> JavaSender defaultJavaSender = new<br>
> SenderClient.Builder("<a href="http://localhost:8080/ag-push" target="_blank">http://localhost:8080/ag-push</a>")<br>
> .pushApplicationId("c7fc6525-5506-4ca9-9cf1-55cc261ddb9c")<br>
> .masterSecret("8b2f43a9-23c8-44fe-bee9-d6b0af9e316b")<br>
> .build();<br>
><br>
><br>
> Why ?<br>
><br>
</span>> - Regarding design, these 2 fields are more part of the sender rather<br>
> than the message itself<br>
> - This is a first step to externalize the configuration, so we could<br>
<span class="">> have later, for instance, `JavaSender defaultJavaSender = new<br>
> SenderClient.Config("path.to.config(or resource stream")<br>
</span>I'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>
><br>
> What does it change ?<br>
><br>
</span>> - It only concerns the Java Sender, we do not touch the Rest Sender API<br>
> here.<br>
> - A Sender instance is now bounded to a particular PushApp, so if we<br>
<span class="">> want to send a message to another PushApp we should :<br>
</span>> - Create a new instance of the Sender<br>
> - Expose setters to update the config.<br>
><br>
> So , wdyt ?<br>
<span class="im HOEnZb"><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>
<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>