Interface IStandaloneServerCommandExecutor
-
public interface IStandaloneServerCommandExecutor
The command executor of the 1C:Enterprise Standalone server utility commands.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Process
execute(List<String> command, boolean wait)
Executes the provided command and returns executed process instance.Process
executeAndWaitServerStart(List<String> command)
Executes the provided server start command and returns executed process instance.Charset
getCharset()
Returns the charset to read the server process output.String
readErrorStream(Process process)
Reads and returns error stream of the process.String
readInputStream(Process process)
Reads and returns input stream of the process.
-
-
-
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 benull
wait
- whether need to wait for process finish- Returns:
- the executed
Process
instance, nevernull
- 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 benull
- Returns:
- the executed
Process
instance, nevernull
- 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 benull
- 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 benull
- 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
-
-