Ejemplo n.º 1
0
 /**
  * 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.");
 }
Ejemplo n.º 2
0
 @Override
 public String[] getAllAvailableCommands() throws RemoteException {
   return actual.getAllAvailableCommands();
 }