org.crsh.shell.impl.command.spi
Interface CommandResolver

All Known Implementing Classes:
LanguageCommandResolver, SystemResolver

public interface CommandResolver

Resolve commands.

Author:
Julien Viet

Method Summary
 Iterable<Map.Entry<String,String>> getDescriptions()
           
 Command<?> resolveCommand(String name)
          Attempt to obtain a command.
 

Method Detail

getDescriptions

Iterable<Map.Entry<String,String>> getDescriptions()
Returns:
the known command names by this resolver, the returned map keys are the command names and the values are the corresponding one line description of the command

resolveCommand

Command<?> resolveCommand(String name)
                          throws CommandException,
                                 NullPointerException
Attempt to obtain a command. Null is returned when such command does not exist.

Parameters:
name - the command name
Returns:
the command shell
Throws:
CommandException - if an error occured preventing the command creation
NullPointerException - if the name argument is null


Copyright © 2015 eXo Platform SAS. All Rights Reserved.