Class ActionCommand
- java.lang.Object
-
- org.apache.karaf.shell.impl.action.command.ActionCommand
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ActionCommand.DelayedCompleter
static class
ActionCommand.DelayedParser
-
Constructor Summary
Constructors Constructor Description ActionCommand(ManagerImpl manager, Class<? extends Action> actionClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Action
createNewAction(Session session)
Object
execute(Session session, List<Object> arguments)
Execute this function within the given Session and with the given arguments.Class<? extends Action>
getActionClass()
Completer
getCompleter(boolean scoped)
Retrieve the completer associated with this command.protected Completer
getCompleter(Class<?> clazz)
String
getDescription()
Retrieve the description of this command.String
getName()
Retrieve the name of this command.Parser
getParser()
Retrieve the parser associated with this command or null for the default one.String
getScope()
Retrieve the scope of this command.protected void
releaseAction(Action action)
-
-
-
Constructor Detail
-
ActionCommand
public ActionCommand(ManagerImpl manager, Class<? extends Action> actionClass)
-
-
Method Detail
-
getScope
public String getScope()
Description copied from interface:Command
Retrieve the scope of this command.
-
getName
public String getName()
Description copied from interface:Command
Retrieve the name of this command.
-
getDescription
public String getDescription()
Description copied from interface:Command
Retrieve the description of this command. This short command description will be printed when using thehelp
command.- Specified by:
getDescription
in interfaceCommand
- Returns:
- the command description.
-
getCompleter
public Completer getCompleter(boolean scoped)
Description copied from interface:Command
Retrieve the completer associated with this command.- Specified by:
getCompleter
in interfaceCommand
- Parameters:
scoped
- whether the command is invoked from a subshell or not- Returns:
- the
Completer
to use
-
getParser
public Parser getParser()
Description copied from interface:Command
Retrieve the parser associated with this command or null for the default one.
-
execute
public Object execute(Session session, List<Object> arguments) throws Exception
Description copied from interface:Function
Execute this function within the given Session and with the given arguments.
-
-