Neil, You should be able to do something quite similar in R7 DS due to the new component property types :)
- Ray On Sat, Mar 25, 2017 at 3:40 PM, Neil Bartlett <njbartl...@gmail.com> wrote: > Speaking of which, I’ve always wanted to use annotations to define my Gogo > commands instead of manually specifying the service properties. So instead > of: > > @Component(property = { “osgi.command.scope=blah”, > “osgi.command.function=dosomething” > }) > public class Blah { > public void dosomething() {} > } > > I would like to write: > > @Component > @GogoScope(“blah”) > public class Blah { > @GogoCommand > public void dosomething() {} > } > > … which would translate at build time to the same thing (I’m not proposing > to change the Gogo runtime model). > > > On 25 Mar 2017, at 13:30, Peter Kriens <peter.kri...@aqute.biz> wrote: > > Most of the Gogo commands I see written do not take advantage of Gogo at > all. Gogo basically allows you to write plain old Java code that is > indistinguishable from your normal service code. In fact, you can often > directly use your service code. This works because Gogo has a powerful > underlying formatting and conversion technique. > > I’ve written, with the help of SMA and Ray Augé, an App note. If you ever > wrote a Gogo command suggest you read it. If you’ve not, a good time to > start: > > http://enroute.osgi.org/appnotes/gogo-cmd.html > > There is also an app note about how to use Gogo, which is also often a > surprise to people. For this next app note I’ve extended the this app note > with an explanation of the Gogo functions/lambdas. > > http://enroute.osgi.org/appnotes/gogo.html > > Enjoy! And please submit a PR to improve these app notes. > > Kind regards, > > Peter Kriens > > > -- > You received this message because you are subscribed to the Google Groups > "bndtools-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to bndtools-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "bndtools-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to bndtools-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> (@rotty3000) Senior Software Architect *Liferay, Inc.* <http://www.liferay.com> (@Liferay) Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev