[aerogear-dev] Proposal to change the Java Sender Builder API
Sebastien Blanc
scm.blanc at gmail.com
Mon Nov 10 12:17:05 EST 2014
On Mon, Nov 10, 2014 at 6:01 PM, Douglas Campos <qmx at qmx.me> wrote:
> On Sat, Nov 08, 2014 at 01:59:31PM +0100, Sebastien Blanc wrote:
> > Hi,
> >
> > Currently in the Java Sender Library the pushApplicationId and the
> > masterSecret are part of the UnifiedPushMessage object. I would like to
> > move these 2 fields to the Sender object and add it to its Builder API,
> to
> > have something like :
> >
> > JavaSender defaultJavaSender = new
> > SenderClient.Builder("http://localhost:8080/ag-push")
> >
> .pushApplicationId("c7fc6525-5506-4ca9-9cf1-55cc261ddb9c")
> > .masterSecret("8b2f43a9-23c8-44fe-bee9-d6b0af9e316b")
> > .build();
> >
> >
> > Why ?
> >
> > - Regarding design, these 2 fields are more part of the sender rather
> > than the message itself
> > - This is a first step to externalize the configuration, so we could
> > have later, for instance, `JavaSender defaultJavaSender = new
> > SenderClient.Config("path.to.config(or resource stream")
> I'm assuming a new Whatever.Config() will yield a Config instance, so
> this looks wrong.
>
Yeah wrong naming, Dan come already with something better
Sender.withConfig(....)
>
> >
> > What does it change ?
> >
> > - It only concerns the Java Sender, we do not touch the Rest Sender
> API
> > here.
> > - A Sender instance is now bounded to a particular PushApp, so if we
> > want to send a message to another PushApp we should :
> > - Create a new instance of the Sender
> > - Expose setters to update the config.
> >
> > So , wdyt ?
>
> > _______________________________________________
> > aerogear-dev mailing list
> > aerogear-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
> --
> qmx
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20141110/414d97c4/attachment.html
More information about the aerogear-dev
mailing list