Nice,
Thanks for the info.
I have used help but not all commands show up in the help context.


On Fri, Jun 17, 2011 at 1:48 AM, Derek Baum <[email protected]> wrote:

> On 16 June 2011 18:51, Mike Veksler <[email protected]> wrote:
> >
> >
> > Thanks for the info on the "e" and "type" commands. I did not see them
> > documented anywhere did you dig in the code to uncover theme?
> >
>
> There is a brief overview of the RFC here
> http://felix.apache.org/site/rfc-147-overview.html
>
> This shows the 'e' closure.
>
> You can discover other commands using 'help'.
>
> g! help install
>
> install - install bundle using URLs
>   scope: felix
>   parameters:
>      String[]   target URLs
>
> Not all commands use annotations to provide help:
>
> g! help type
>
> type
>   scope: gogo
>   parameters:
>      CommandSession
>      String[]
>
> but they may provide the more traditional --help support:
>
> g! type --help
> type - show command type
> Usage: type [OPTIONS] [name[:]]
>  -a --all                 show all matches
>  -? --help                show help
>  -q --quiet               don't print anything, just return status
>  -s --scope=NAME          list all commands in named scope
>  -t --types               show full java type names
>
> and some "commands" are just raw methods, not specifically written to be
> commands:
>
> g! help bundles
>
> g! type bundles
> bundles is Bundle[] context:bundles()
>
> g! type -t bundles
> Bundle[] org.apache.felix.framework.BundleContextImpl.getBundles()
>
>
> Derek
>
>
>
>
> >
> >
> >
> > On Thu, Jun 16, 2011 at 2:13 AM, Derek Baum <[email protected]>
> > wrote:
> >
> > > Hmmm this seems to be a limitation of the iPojo @ServiceProperty
> > > annotation.
> > >
> > > You don't actually need the gogo help command to test your example.
> > >
> > > another command which will show the existence of your search command is
> > > 'type':
> > >
> > > g! type search
> > >
> > > search is Set<Book> book:search(String, String, String, String)
> > > search is Set<Book> book:search(String, String, String, int, int)
> > >
> > > You should be able to invoke it directly:
> > >
> > > g! search args ...
> > >
> > > Derek
> > >
> > >
> > >
> > >
> > > On 16 June 2011 09:58, Mike Veksler <[email protected]> wrote:
> > >
> > > > I tried registing FUNCTIONS however the annotation expects String
> value
> > > and
> > > > not String array.
> > > >
> > > > On Thu, Jun 16, 2011 at 1:55 AM, Derek Baum <[email protected]>
> > > > wrote:
> > > >
> > > > > This is a bug in the gogo help command.
> > > > >
> > > > > Services proving commands can be registered with
> > > > > @ServiceProperty(name = "osgi.command.function", functions)
> > > > >
> > > > > where functions is either String or String[].
> > > > >
> > > > > The gogo help command does not take account of this being a String
> > > rather
> > > > > than String[].
> > > > >
> > > > > The quick fix for now is to register FUNCTIONS rather than
> > > FUNCTIONS_STR.
> > > > >
> > > > > I'll raise an issue to fix the gogo help command.
> > > > >
> > > > > Derek
> > > > >
> > > > >
> > > > > On 16 June 2011 09:46, Mike Veksler <[email protected]> wrote:
> > > > >
> > > > > > Here is the stack trace:
> > > > > > g! e
> > > > > > java.lang.ClassCastException: java.lang.String cannot be cast to
> > > > > > [Ljava.lang.String;
> > > > > >        at
> > > > org.apache.felix.gogo.command.Basic.getCommands(Basic.java:384)
> > > > > >        at
> org.apache.felix.gogo.command.Basic.help(Basic.java:211)
> > > > > >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > > > > >        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> > Source)
> > > > > >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> > > > Source)
> > > > > >        at java.lang.reflect.Method.invoke(Unknown Source)
> > > > > >        at
> > > > > >
> > org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
> > > > > >        at
> > > > > >
> > > >
> > org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
> > > > > >        at
> > > > > >
> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
> > > > > >        at
> > > > > >
> > > >
> > org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)
> > > > > >        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
> > > > > >        at
> > > > org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
> > > > > >        at
> > > > org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
> > > > > >        at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.jav
> > > > > > a:89)
> > > > > >        at
> org.apache.felix.gogo.shell.Console.run(Console.java:62)
> > > > > >        at
> org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
> > > > > >        at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
> > > > > >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > > > > >        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> > Source)
> > > > > >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> > > > Source)
> > > > > >        at java.lang.reflect.Method.invoke(Unknown Source)
> > > > > >        at
> > > > > >
> > org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
> > > > > >        at
> > > > > >
> > > >
> > org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
> > > > > >        at
> > > > > >
> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
> > > > > >        at
> > > > > >
> > > >
> > org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)
> > > > > >        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
> > > > > >        at
> > > > org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
> > > > > >        at
> > > > org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
> > > > > >        at
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.jav
> > > > > > a:89)
> > > > > >        at
> > > > > >
> org.apache.felix.shell.remote.Shell.startGogoShell(Shell.java:108)
> > > > > >        at org.apache.felix.shell.remote.Shell.run(Shell.java:81)
> > > > > >        at java.lang.Thread.run(Unknown Source)
> > > > > > g!
> >
>

Reply via email to