R
raffaele castagno
I need to write a console to manage a game server. It's intended to be
like the one of FreeCIV, if you know it.
Anyway, it's simply a generic console.
I'm planning to use the sourceForge project JLine to manage the user input
(name completion, command history, etc), and the jacarta.commons CLI to
parse command lines.
The last obvious step is the effective execution of the given commands. Of
course there are many ways to do it, but at the present time I don't know
what is the best way to do it.
Reading some docs about pattern, I've seen the Comman pattern, and it
seems to be something similar to what I need. But, I can't find a usable
implementation of this pattern.
So, the question is:
can you tell me if the command pattern is good for my goal? If not, what
is the best way to do the work?
Thanks you!
Greetings!
Raffaele
like the one of FreeCIV, if you know it.
Anyway, it's simply a generic console.
I'm planning to use the sourceForge project JLine to manage the user input
(name completion, command history, etc), and the jacarta.commons CLI to
parse command lines.
The last obvious step is the effective execution of the given commands. Of
course there are many ways to do it, but at the present time I don't know
what is the best way to do it.
Reading some docs about pattern, I've seen the Comman pattern, and it
seems to be something similar to what I need. But, I can't find a usable
implementation of this pattern.
So, the question is:
can you tell me if the command pattern is good for my goal? If not, what
is the best way to do the work?
Thanks you!
Greetings!
Raffaele