Class Launcher

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.lang.Class<? extends CommandLineTool>> getToolClasses()
      Retrieves a list of all of the classes that provide the implementations for all of the command-line tools included with the LDAP SDK.
      static CommandLineTool getToolInstance​(java.lang.Class<?> toolClass, java.io.OutputStream outStream, java.io.OutputStream errStream)
      Retrieves an instance of the specified type of command-line tool with the given output and error streams.
      static ResultCode main​(java.io.OutputStream outStream, java.io.OutputStream errStream, java.lang.String... args)
      Parses the command-line arguments and performs any appropriate processing for this program.
      static void main​(java.lang.String... args)
      Parses the command-line arguments and performs any appropriate processing for this program.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • main

        public static void main​(@NotNull
                                java.lang.String... args)
        Parses the command-line arguments and performs any appropriate processing for this program.
        Parameters:
        args - The command-line arguments provided to this program.
      • main

        @NotNull
        public static ResultCode main​(@Nullable
                                      java.io.OutputStream outStream,
                                      @Nullable
                                      java.io.OutputStream errStream,
                                      @NotNull
                                      java.lang.String... args)
        Parses the command-line arguments and performs any appropriate processing for this program.
        Parameters:
        outStream - The output stream to which standard out should be written. It may be null if output should be suppressed.
        errStream - The output stream to which standard error should be written. It may be null if error messages should be suppressed.
        args - The command-line arguments provided to this program.
        Returns:
        A result code with information about the status of processing.
      • getToolClasses

        @NotNull
        public static java.util.List<java.lang.Class<? extends CommandLineTool>> getToolClasses()
        Retrieves a list of all of the classes that provide the implementations for all of the command-line tools included with the LDAP SDK.
        Returns:
        A list of all of the classes that provide the implementations for all of the command-line tools included with the LDAP SDK.
      • getToolInstance

        @NotNull
        public static CommandLineTool getToolInstance​(@NotNull
                                                      java.lang.Class<?> toolClass,
                                                      @Nullable
                                                      java.io.OutputStream outStream,
                                                      @Nullable
                                                      java.io.OutputStream errStream)
                                               throws LDAPException
        Retrieves an instance of the specified type of command-line tool with the given output and error streams. The tool class must provide a two-argument constructor in which the first argument is a possibly-null OutputStream to use for standard output, and the second argument is a possibly-null OutputStream to use for standard error.
        Parameters:
        toolClass - The class that provides the implementation for the desired command-line tool.
        outStream - The output stream to which standard out should be written. It may be null if output should be suppressed.
        errStream - The output stream to which standard error should be written. It may be null if error messages should be suppressed.
        Returns:
        An instance of the specified command-line tool.
        Throws:
        LDAPException - If a problem occurs while attempting to create an instance of the requested tool.