Interface IStandaloneServerCommandExecutor


  • public interface IStandaloneServerCommandExecutor
    The command executor of the 1C:Enterprise Standalone server utility commands.
    • Method Detail

      • execute

        Process execute​(List<String> command,
                        boolean wait)
                 throws StandaloneServerException
        Executes the provided command and returns executed process instance.
        Parameters:
        command - the command list to execute, cannot be null
        wait - whether need to wait for process finish
        Returns:
        the executed Process instance, never null
        Throws:
        StandaloneServerException - if command execution error occurred
      • executeAndWaitServerStart

        Process executeAndWaitServerStart​(List<String> command)
                                   throws StandaloneServerException
        Executes the provided server start command and returns executed process instance.
        Parameters:
        command - the command list to execute, cannot be null
        Returns:
        the executed Process instance, never null
        Throws:
        StandaloneServerException - if command execution error occurred
      • readInputStream

        String readInputStream​(Process process)
                        throws StandaloneServerException
        Reads and returns input stream of the process.
        Parameters:
        process - the process to read stream, cannot be null
        Returns:
        the input message, never null
        Throws:
        StandaloneServerException - if command input read error occurred
      • readErrorStream

        String readErrorStream​(Process process)
                        throws StandaloneServerException
        Reads and returns error stream of the process.
        Parameters:
        process - the process to read stream, cannot be null
        Returns:
        the error message, never null
        Throws:
        StandaloneServerException - if command input read error occurred
      • getCharset

        Charset getCharset()
        Returns the charset to read the server process output.
        Returns:
        the charset to read the server process output, never null