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 
> <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 
> <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 
> <mailto:bndtools-users+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to