/** * Utility method for getting a short help string for a server. Basically it contains an * introductory message and also lists all available apps for the server. * * @param server the server to ask for * @return the short introductory help string. */ public static void printHelpString(Output out, ShellServer server, boolean list) throws ShellException, RemoteException { String header = "Available commands:"; if (list) { out.println(header); out.println(); for (String command : server.getAllAvailableCommands()) { out.println(" " + command); } out.println(); } else { out.println(header + " " + availableCommandsAsString(server)); } out.println("Use " + getShortUsageString() + " for info about each command."); }
@Override public String[] getAllAvailableCommands() throws RemoteException { return actual.getAllAvailableCommands(); }