We do this a lot in the karaf itests.
See
https://github.com/apache/karaf/blob/master/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java#L248-L306
This is for the karaf shell but you should be able to adapt this to gogo
easily.
Basically you create a session from the CommandProcessor service and
call execute on it.
Christian
On 10.12.2016 20:15, Elliot Huntington wrote:
The enRoute tutorials show how to create your own Gogo Shell commands
using the package 'osgi.enroute.debug.api' using Debug.COMMAND_SCOPE
and Debug.COMMAND_FUNCTION. This is a useful feature!
I'm just curious if it is possible to access these commands
programatically? Does anyone have an example I could look at for how
to access the Gogo Shell and issue commands to it from within a program?
Sincerely,
Elliot
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev