I’m trying to figure out how to register more than one command in the gogo shell from one java class, when using an osgi Component annotation.
So for one command, it’s fine. I can do: import org.osgi.service.component.annotations.Component; // NB @Component( service = Object.class, property = { CommandProcessor.COMMAND_SCOPE + ":String=example", CommandProcessor.COMMAND_FUNCTION + "=listProjects" } ) public class ListProjectsCommand { public void listProjects() { System.out.println("listing Projects"); } } My question is, how do I register more? I can’t work out the syntax for passing in an array of names as the value of the COMMAND_FUNCTION property. I’ve tried “list*”, as hinted at in the doc (“A name may end with a *, this will then be calculated from all declared public methods in this service”), but that doesn’t work. Ideally I want to say “*” but that doesn’t seem to work either, as far as I can tell. I don’t really want to have to create one java class for each, trivial, command I want in the gogo shell. Any suggestions? Thanks.