com.cloudbees.sdk.cli
Interface CommandService


public interface CommandService

Resolves command names to their implementations.

This interface isn't intended to be implemented by plugins. It is rather a representation of the contract from the CLI environment to plugins. You can inject this component to your code by using this interface.

Bees CLI implements CommandService to encapsulate automatic plugin discovery logic.

Author:
Kohsuke Kawaguchi

Method Summary
 ACommand getCommand(String name)
          Resolves a command to its implementation.
 

Method Detail

getCommand

ACommand getCommand(String name)
                    throws IOException,
                           AbortException
Resolves a command to its implementation.

Parameters:
name - Name of the command, such as "app:deploy", "help", or "foo:bar".
Returns:
null if the command of the said name is not found.
Throws:
IOException - If a fatal error occurs during the retrieval of the command implementation.
AbortException - If an anticipated problem happens, this exception is thrown. The caller must handle this exception without reporting a stack trace.


Copyright © 2011-2014. All Rights Reserved.