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 bindersthose 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 implementationlongProcessBinder.getKillDelay()method implementationProcessBinder.getOutputRedirect()method implementation.<T> ServiceBinderImpl<T>getServiceBinder(Class<T> service) ProcessBinder.getServiceBinder(Class)method implementationlongProcessBinder.getStartTimeout()method implementation.booleanProcessBinder.mergeErrorsWithOutput()method implementation.mergeErrorsWithOutput(boolean merge) ProcessBinder.mergeErrorsWithOutput(boolean)method implementation.static ProcessBinderImplnewInstance(IProcessManager processManager, String key) Creates a new instance with givenprocess managerand 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 managerand key of corresponding process.- Parameters:
processManager- givenprocess managerkey- given key of corresponding process
-
getKey
ProcessBinder.getKey()method implementation- Specified by:
getKeyin interfaceProcessBinder- Returns:
- a key of process for which this
ProcessBinderwas created
-
setEnvironment
ProcessBinder.setEnvironment(String, String)method implementation- Specified by:
setEnvironmentin interfaceProcessBinder- Parameters:
variableName- given environment variable namevariableValue- given environment variable value- Returns:
- this instance
-
setEnvironments
ProcessBinder.setEnvironments(Map)method implementation- Specified by:
setEnvironmentsin interfaceProcessBinder- Parameters:
environments- given map of environment variables (notnull). Do not placenullkeys or values into the given map.- Returns:
- this instance
-
setProcessKillDelay
ProcessBinder.setProcessKillDelay(long)method implementation- Specified by:
setProcessKillDelayin interfaceProcessBinder- Parameters:
delay- given delay- Returns:
- this instance
-
setStartTimeOut
ProcessBinder.setStartTimeOut(long)method implementation.- Specified by:
setStartTimeOutin interfaceProcessBinder- Parameters:
timeout- given timeout (notnull)- Returns:
- this instance
-
redirectInput
ProcessBinder.redirectInput(Redirect)method implementation.- Specified by:
redirectInputin interfaceProcessBinder- Parameters:
source- given standard input source of the process- Returns:
- this instance
- See Also:
-
redirectOutput
ProcessBinder.redirectOutput(Redirect)method implementation.- Specified by:
redirectOutputin 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:
redirectErrorin 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:
mergeErrorsWithOutputin 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:
getServiceBinderin interfaceProcessBinder- Parameters:
service- given service- Returns:
- new or existing
service binderfor given service and corresponding process - See Also:
-
completeBinding
ProcessBinder.completeBinding()method implementation- Specified by:
completeBindingin interfaceProcessBinder- Returns:
- the
process manageron which thisprocess binderis created
-
getKillDelay
public long getKillDelay()ProcessBinder.getKillDelay()method implementation- Specified by:
getKillDelayin 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:
getStartTimeoutin interfaceProcessBinder- Returns:
- start timeout
- See Also:
-
getInputRedirect
ProcessBinder.getInputRedirect()method implementation.- Specified by:
getInputRedirectin interfaceProcessBinder- Returns:
- the process's standard input stream redirect set by
ProcessBinder.redirectInput(Redirect)(notnull)
-
getOutputRedirect
ProcessBinder.getOutputRedirect()method implementation.- Specified by:
getOutputRedirectin interfaceProcessBinder- Returns:
- the process's standard output stream redirect, which is set by
ProcessBinder.redirectOutput(Redirect)(notnull)
-
getErrorsRedirect
ProcessBinder.getErrorsRedirect()method implementation.- Specified by:
getErrorsRedirectin 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:
mergeErrorsWithOutputin 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,
IllegalStateExceptionis thrown.- Specified by:
getEnvironmentsin 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 bindersthose bindings are complete.- Specified by:
getAllBoundServiceBindersin interfaceProcessBinder- Returns:
- a collection with all the
service bindersthose bindings are complete
-