Class AbstractRuntimeComponentExecutor
- java.lang.Object
-
- com._1c.g5.v8.dt.platform.services.core.runtimes.execution.impl.AbstractRuntimeComponentExecutor
-
- All Implemented Interfaces:
IRuntimeComponentExecutor
- Direct Known Subclasses:
DebugServerExecutor
,DesignerSessionThickClientLauncher
,InterfaceLanguagesExecutor
,PublishExecutor
,ThickClientLauncher
,ThinClientLauncher
,WebClientLauncher
public abstract class AbstractRuntimeComponentExecutor extends Object implements IRuntimeComponentExecutor
Abstract implementation ofIRuntimeComponentExecutor
.
-
-
Constructor Summary
Constructors Constructor Description AbstractRuntimeComponentExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T extends AbstractExecutionCommandBuilder<T>>
voidappendClientArguments(T command, RuntimeExecutionArguments arguments)
Append 1C:Enterprise client arguments to constructing 1C:Enterprise runtime command builder.protected void
appendExtensionCustomization(RuntimeExecutionCommandBuilder commandBuilder, RuntimeExecutionArguments arguments)
Append configuration extension customization to constructing 1C:Enterprise runtime command builder, if they exists in given arguments.protected <T extends AbstractExecutionCommandBuilder<T>>
voidappendInfobaseAccess(T commandBuilder, RuntimeExecutionArguments arguments)
Append infobase access options (user name and user password parameters or OS authentication) to constructing 1C:Enterprise runtime command builder, if they exists in given arguments.protected void
appendRuntimeClientArguments(RuntimeExecutionCommandBuilder command, RuntimeExecutionArguments arguments)
Append 1C:Enterprise runtime client arguments to constructing 1C:Enterprise runtime command builder.protected File
createTempFile()
Create temporary file.protected String
executeRuntimeProcessCommand(RuntimeExecutionCommandBuilder command, RuntimeInstallation installation, InfobaseReference infobase, RuntimeExecutionArguments arguments)
Execute given 1C:Enterprise runtime process command and log execution messages to file.boolean
needComponent()
Returns whether instance of 1C:Enterprise component is needed for execution.protected String
readRuntimeLog(File logFile, RuntimeInstallation installation)
Reads and returns entire 1C:Enterprise runtime execution log content.protected boolean
splitInfobaseConnection()
Returns whether need to split infobase name from infobase command option in infobase connection option.
-
-
-
Method Detail
-
needComponent
public boolean needComponent()
Description copied from interface:IRuntimeComponentExecutor
Returns whether instance of 1C:Enterprise component is needed for execution. Some of executor implementations requires compoment for execution actions: for example, executable files launching.- Specified by:
needComponent
in interfaceIRuntimeComponentExecutor
- Returns:
- whether instance of 1C:Enterprise component is needed for execution
-
executeRuntimeProcessCommand
protected String executeRuntimeProcessCommand(RuntimeExecutionCommandBuilder command, RuntimeInstallation installation, InfobaseReference infobase, RuntimeExecutionArguments arguments) throws RuntimeExecutionException, RuntimeVersionRequiredException
Execute given 1C:Enterprise runtime process command and log execution messages to file. Method will create temporary log file and append log file usage to given command.If 1C:Enterprise runtime process will be executed unsuccessfully, log file will be read after process execution and
RuntimeExecutionException
will be thrown with full log file content.Log file will be read and deleted after method execution. Method returns entire log content.
- Parameters:
command
- the command builder to execute command with, cannot benull
installation
- the owner 1C:Enterprise runtime installation instance can benull
arguments
- execution arguments, can be null, then will not be used- Throws:
RuntimeExecutionException
- if runtime process fails with some reasonRuntimeVersionRequiredException
- if execution of 1C:Etenprise runtime was processed from illegal 1C:Enterprise runtime version; exception holds information about required version for this execution
-
readRuntimeLog
protected String readRuntimeLog(File logFile, RuntimeInstallation installation) throws IOException
Reads and returns entire 1C:Enterprise runtime execution log content.- Parameters:
logFile
- the log file to read, cannot benull
installation
- the owner 1C:Enterprise runtime installation instance can benull
- Returns:
- the entire 1C:Enterprise runtime execution log content, never
null
- Throws:
IOException
- if an I/O error occurred
-
appendClientArguments
protected <T extends AbstractExecutionCommandBuilder<T>> void appendClientArguments(T command, RuntimeExecutionArguments arguments)
Append 1C:Enterprise client arguments to constructing 1C:Enterprise runtime command builder.- Parameters:
command
- the constructing command to append to, cannot benull
arguments
- the arguments to append, cannot benull
-
appendRuntimeClientArguments
protected void appendRuntimeClientArguments(RuntimeExecutionCommandBuilder command, RuntimeExecutionArguments arguments)
Append 1C:Enterprise runtime client arguments to constructing 1C:Enterprise runtime command builder.- Parameters:
command
- the constructing command to append to, cannot benull
arguments
- the arguments to append, cannot benull
-
appendExtensionCustomization
protected void appendExtensionCustomization(RuntimeExecutionCommandBuilder commandBuilder, RuntimeExecutionArguments arguments)
Append configuration extension customization to constructing 1C:Enterprise runtime command builder, if they exists in given arguments.- Parameters:
commandBuilder
- constructing 1C:Enterprise command builder, cannot benull
arguments
- 1C:Enterprise runtime execution arguments, can benull
, then will not be appended
-
appendInfobaseAccess
protected <T extends AbstractExecutionCommandBuilder<T>> void appendInfobaseAccess(T commandBuilder, RuntimeExecutionArguments arguments)
Append infobase access options (user name and user password parameters or OS authentication) to constructing 1C:Enterprise runtime command builder, if they exists in given arguments.- Parameters:
commandBuilder
- constructing 1C:Enterprise command builder, cannot benull
arguments
- 1C:Enterprise runtime execution arguments, can benull
, then will not be appended
-
splitInfobaseConnection
protected boolean splitInfobaseConnection()
Returns whether need to split infobase name from infobase command option in infobase connection option.- Returns:
- whether need to split infobase name from infobase command option
-
createTempFile
protected File createTempFile() throws IOException
Create temporary file. The caller is responsible for file deletion.- Returns:
- the created ready-to-use temporary file, never
null
- Throws:
IOException
- if an I/O error occurred
-
-