Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse SmartHome » ESH Console extensions
ESH Console extensions [message #1783308] Sun, 11 March 2018 13:22 Go to next message
Chris Jackson is currently offline Chris JacksonFriend
Messages: 256
Registered: December 2013
Senior Member
I was looking for general documentation on the console extensions, but haven't found anything. I'm looking to add some extensions, but would like to know how the console is instantiated.

I assume that the console is instantiated once per user, but are the implementations of AbstractConsoleCommandExtension instantiated on each command, or is this created when the console is created?

I would to store some context variables between sub commands if possible so the user doesn't need to type all options every time. Is this possible?

So for example, instead of -:

cmd thing subcommand1 value1
cmd thing subcommand2 value2

we could have something like -:

cmd thing
cmd subcommand1 value1
cmd subcommand2 value2


Thanks
Chris
Re: ESH Console extensions [message #1783347 is a reply to message #1783308] Mon, 12 March 2018 09:31 Go to previous message
Simon Kaufmann is currently offline Simon KaufmannFriend
Messages: 51
Registered: January 2011
Member
Hi Chris,

the implementations for RFC 147 and Eclipse suggest that they are ordinary service instances, hence they also could keep some state in between calls.

As far as I can see, your use-case should work. Whether one should do that or not is another question and probably also depends on the concrete use-case, of course.

Cheers,
Simon
Previous Topic:Eclipse SmartHome karaf Feature verification.......FAILURE
Next Topic:Depencies in Eclipse Smart Home, howto import?
Goto Forum:
  


Current Time: Thu Sep 20 16:05:46 GMT 2018

Powered by FUDForum. Page generated in 0.02385 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top