org.opends.server.util.cli
Interface Menu<T>

Type Parameters:
T - The type of success result value(s) returned by the call-back. Use Void if the call-backs do not return any values.

public interface Menu<T>

An interactive console-based menu.


Method Summary
 MenuResult<T> run()
          Displays the menu and waits for the user to select a valid option.
 

Method Detail

run

MenuResult<T> run()
                  throws CLIException
Displays the menu and waits for the user to select a valid option. When the user selects an option, the call-back associated with the option will be invoked and its result returned.

Returns:
Returns the result of invoking the chosen menu call-back.
Throws:
CLIException - If an I/O exception occurred or if one of the menu option call-backs failed for some reason.