Interface ICommand

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ResultCode execute​(java.lang.String[] args)
      Calls this ICommand with given arguments.
      java.lang.String getName()
      Returns the name of this command.
      void printUsage​(java.io.PrintStream out)
      Prints usage information for this command.
    • Method Detail

      • execute

        ResultCode execute​(java.lang.String[] args)
                    throws ch.systemsx.cisd.common.exceptions.UserFailureException,
                           ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
        Calls this ICommand with given arguments.

        The arguments are the main(String[]) method ones.

        Note that this method is expected to throw given RuntimeException (unchecked) exceptions. So do not catch them and let the caller handle them.
        Returns:
        exit code, will be used in System.exit().
        Throws:
        ch.systemsx.cisd.common.exceptions.UserFailureException
        ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
      • getName

        java.lang.String getName()
        Returns the name of this command.

        On the client side, this ICommand is registered with this name. This is kind of unique identifier of this ICommand.

      • printUsage

        void printUsage​(java.io.PrintStream out)
        Prints usage information for this command.
        Parameters:
        out - The stream to which help is printed