Package com._1c.g5.v8.dt.internal.pm
Class ProcessBinderImpl
java.lang.Object
com._1c.g5.v8.dt.internal.pm.ProcessBinderImpl
- All Implemented Interfaces:
ProcessBinder
ProcessBinder
implementation.
Provides some additional methods which are used in implementation
.
-
Method Summary
Modifier and TypeMethodDescriptionProcessBinder.completeBinding()
method implementationReturns a collection with all theservice binders
those bindings are complete.Returns a map with all environments variables were set at the time of binding.ProcessBinder.getErrorsRedirect()
method implementation.ProcessBinder.getInputRedirect()
method implementation.getKey()
ProcessBinder.getKey()
method implementationlong
ProcessBinder.getKillDelay()
method implementationProcessBinder.getOutputRedirect()
method implementation.<T> ServiceBinderImpl<T>
getServiceBinder
(Class<T> service) ProcessBinder.getServiceBinder(Class)
method implementationlong
ProcessBinder.getStartTimeout()
method implementation.boolean
ProcessBinder.mergeErrorsWithOutput()
method implementation.mergeErrorsWithOutput
(boolean merge) ProcessBinder.mergeErrorsWithOutput(boolean)
method implementation.static ProcessBinderImpl
newInstance
(IProcessManager processManager, String key) Creates a new instance with givenprocess manager
and key of corresponding process.redirectError
(ProcessBuilder.Redirect destination) ProcessBinder.redirectError(Redirect)
method implementation.redirectInput
(ProcessBuilder.Redirect source) ProcessBinder.redirectInput(Redirect)
method implementation.redirectOutput
(ProcessBuilder.Redirect destination) ProcessBinder.redirectOutput(Redirect)
method implementation.setEnvironment
(String variableName, String variableValue) ProcessBinder.setEnvironment(String, String)
method implementationsetEnvironments
(Map<String, String> environments) ProcessBinder.setEnvironments(Map)
method implementationsetProcessKillDelay
(long delay) ProcessBinder.setProcessKillDelay(long)
method implementationsetStartTimeOut
(long timeout) ProcessBinder.setStartTimeOut(long)
method implementation.
-
Method Details
-
newInstance
Creates a new instance with givenprocess manager
and key of corresponding process.- Parameters:
processManager
- givenprocess manager
key
- given key of corresponding process
-
getKey
ProcessBinder.getKey()
method implementation- Specified by:
getKey
in interfaceProcessBinder
- Returns:
- a key of process for which this
ProcessBinder
was created
-
setEnvironment
ProcessBinder.setEnvironment(String, String)
method implementation- Specified by:
setEnvironment
in interfaceProcessBinder
- Parameters:
variableName
- given environment variable namevariableValue
- given environment variable value- Returns:
- this instance
-
setEnvironments
ProcessBinder.setEnvironments(Map)
method implementation- Specified by:
setEnvironments
in interfaceProcessBinder
- Parameters:
environments
- given map of environment variables (notnull
). Do not placenull
keys or values into the given map.- Returns:
- this instance
-
setProcessKillDelay
ProcessBinder.setProcessKillDelay(long)
method implementation- Specified by:
setProcessKillDelay
in interfaceProcessBinder
- Parameters:
delay
- given delay- Returns:
- this instance
-
setStartTimeOut
ProcessBinder.setStartTimeOut(long)
method implementation.- Specified by:
setStartTimeOut
in interfaceProcessBinder
- Parameters:
timeout
- given timeout (notnull
)- Returns:
- this instance
-
redirectInput
ProcessBinder.redirectInput(Redirect)
method implementation.- Specified by:
redirectInput
in interfaceProcessBinder
- Parameters:
source
- given standard input source of the process- Returns:
- this instance
- See Also:
-
redirectOutput
ProcessBinder.redirectOutput(Redirect)
method implementation.- Specified by:
redirectOutput
in interfaceProcessBinder
- Parameters:
destination
- given destination of the standard output of the process- Returns:
- this instance
- See Also:
-
redirectError
ProcessBinder.redirectError(Redirect)
method implementation.- Specified by:
redirectError
in interfaceProcessBinder
- Parameters:
destination
- given destination of the standard errors of the process- Returns:
- this instance
- See Also:
-
mergeErrorsWithOutput
ProcessBinder.mergeErrorsWithOutput(boolean)
method implementation.- Specified by:
mergeErrorsWithOutput
in interfaceProcessBinder
- Parameters:
merge
- specifies whether to merge standard output and errors stream of the process- Returns:
- this instance
- See Also:
-
getServiceBinder
ProcessBinder.getServiceBinder(Class)
method implementation- Specified by:
getServiceBinder
in interfaceProcessBinder
- Parameters:
service
- given service- Returns:
- new or existing
service binder
for given service and corresponding process - See Also:
-
completeBinding
ProcessBinder.completeBinding()
method implementation- Specified by:
completeBinding
in interfaceProcessBinder
- Returns:
- the
process manager
on which thisprocess binder
is created
-
getKillDelay
public long getKillDelay()ProcessBinder.getKillDelay()
method implementation- Specified by:
getKillDelay
in interfaceProcessBinder
- Returns:
- a delay after that corresponding process will be killed after all the instances created within that process were disposed
-
getStartTimeout
public long getStartTimeout()ProcessBinder.getStartTimeout()
method implementation.- Specified by:
getStartTimeout
in interfaceProcessBinder
- Returns:
- start timeout
- See Also:
-
getInputRedirect
ProcessBinder.getInputRedirect()
method implementation.- Specified by:
getInputRedirect
in interfaceProcessBinder
- Returns:
- the process's standard input stream redirect set by
ProcessBinder.redirectInput(Redirect)
(notnull
)
-
getOutputRedirect
ProcessBinder.getOutputRedirect()
method implementation.- Specified by:
getOutputRedirect
in interfaceProcessBinder
- Returns:
- the process's standard output stream redirect, which is set by
ProcessBinder.redirectOutput(Redirect)
(notnull
)
-
getErrorsRedirect
ProcessBinder.getErrorsRedirect()
method implementation.- Specified by:
getErrorsRedirect
in interfaceProcessBinder
- Returns:
- the process's standard errors stream redirect, which is set by
ProcessBinder.redirectError(Redirect)
(notnull
)
-
mergeErrorsWithOutput
public boolean mergeErrorsWithOutput()ProcessBinder.mergeErrorsWithOutput()
method implementation.- Specified by:
mergeErrorsWithOutput
in interfaceProcessBinder
- Returns:
- whether to merge process's standard errors stream with it's standard output stream
-
getEnvironments
Returns a map with all environments variables were set at the time of binding. Must be called only when a binding is complete. If called when the binding is not complete,
IllegalStateException
is thrown.- Specified by:
getEnvironments
in interfaceProcessBinder
- Returns:
- a map with all environments variables were set at the time of binding (not
null
). The returned map is unmodifiable, any modifying operations are not performed. - Throws:
IllegalStateException
- if called when the binding is not complete
-
getAllBoundServiceBinders
Returns a collection with all theservice binders
those bindings are complete.- Specified by:
getAllBoundServiceBinders
in interfaceProcessBinder
- Returns:
- a collection with all the
service binders
those bindings are complete
-