public interface App
| Modifier and Type | Method and Description |
|---|---|
List<String> |
completionCandidates(String partOfLine,
Session session)
Tries to complete the
partOfLine with likely candidates,
think of this as a hook for writing TAB-completion. |
Continuation |
execute(AppCommandParser parser,
Session session,
Output out)
The actual code for the application.
|
String[] |
getAvailableOptions() |
String |
getDescription() |
String |
getDescription(String option) |
String |
getName() |
OptionDefinition |
getOptionDefinition(String option) |
AppShellServer |
getServer()
Returns the server this app runs in.
|
void |
shutdown()
Put code here which will need to run before the shell server is shut down
|
boolean |
takesOptions() |
String getName()
OptionDefinition getOptionDefinition(String option)
option - the name of the option. An option could be like this:
"ls -l" where "l" is an option.option.String[] getAvailableOptions()
Continuation execute(AppCommandParser parser, Session session, Output out) throws Exception
parser - holds the options (w/ or w/o values) as well as arguments.session - the client session (sort of like the environment
for the execution).out - the output channel for the execution, just like System.out.Exception - if the execution fails.AppShellServer getServer()
String getDescription()
String getDescription(String option)
option - the option to get the description for.void shutdown()
List<String> completionCandidates(String partOfLine, Session session) throws ShellException
partOfLine with likely candidates,
think of this as a hook for writing TAB-completion. Returned candidates
should contains the supplied part as well as possible completions.
Implementing this is optional and it's OK to just return an empty list.partOfLine - the part of the line which the client wants to complete
using TAB-completion.session - the Session from the client caller.partOfLine
as well as possible completions. Returns an empty list if no completions found
or if the implementing class chooses not to implement it properly.ShellExceptionboolean takesOptions()
Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.