|
org.netbeans.modules.extexecution/2 1.21.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.api.extexecution.ExecutionDescriptor
public final class ExecutionDescriptor
Descriptor for the execution environment. Describes the runtime attributes
of the ExecutionService.
Thread safety of this class depends on type of objects passed to its configuration methods. If these objects are immutable, resulting descriptor is immutable as well. It these objects are thread safe, resulting descriptor is thread safe as well.
ExecutionService| Nested Class Summary | |
|---|---|
static interface |
ExecutionDescriptor.InputProcessorFactory
Factory creating the input processor. |
static interface |
ExecutionDescriptor.LineConvertorFactory
Factory creating the line covertor. |
static interface |
ExecutionDescriptor.RerunCondition
Represents the possibility of reruning the action. |
| Constructor Summary | |
|---|---|
ExecutionDescriptor()
Creates the new descriptor. |
|
| Method Summary | |
|---|---|
ExecutionDescriptor |
charset(Charset charset)
Returns a descriptor with configured charset. |
ExecutionDescriptor |
controllable(boolean controllable)
Returns a descriptor with configured controllable flag. |
ExecutionDescriptor |
errConvertorFactory(ExecutionDescriptor.LineConvertorFactory convertorFactory)
Returns a descriptor with configured factory for convertor for standard error output. |
ExecutionDescriptor |
errLineBased(boolean errLineBased)
Returns a descriptor with configured flag indicating line based standard error output. |
ExecutionDescriptor |
errProcessorFactory(ExecutionDescriptor.InputProcessorFactory errProcessorFactory)
Returns a descriptor with configured factory for standard error output processor. |
ExecutionDescriptor |
frontWindow(boolean frontWindow)
Returns a descriptor with configured front window flag. |
ExecutionDescriptor |
inputOutput(InputOutput io)
Returns a descriptor with configured custom io. |
ExecutionDescriptor |
inputVisible(boolean inputVisible)
Returns a descriptor with configured input visible flag. |
ExecutionDescriptor |
noReset(boolean noReset)
Returns a descriptor with configured no reset flag. |
ExecutionDescriptor |
optionsPath(String optionsPath)
Returns a descriptor with configured options path. |
ExecutionDescriptor |
outConvertorFactory(ExecutionDescriptor.LineConvertorFactory convertorFactory)
Returns a descriptor with configured factory for convertor for standard output. |
ExecutionDescriptor |
outLineBased(boolean outLineBased)
Returns a descriptor with configured flag indicating line based standard output. |
ExecutionDescriptor |
outProcessorFactory(ExecutionDescriptor.InputProcessorFactory outProcessorFactory)
Returns a descriptor with configured factory for standard output processor. |
ExecutionDescriptor |
postExecution(Runnable postExecution)
Returns a descriptor with configured post execution runnable. |
ExecutionDescriptor |
preExecution(Runnable preExecution)
Returns a descriptor with configured pre execution runnable. |
ExecutionDescriptor |
rerunCondition(ExecutionDescriptor.RerunCondition rerunCondition)
Returns a descriptor with configured rerun condition. |
ExecutionDescriptor |
showProgress(boolean showProgress)
Returns a descriptor with configured show progress flag. |
ExecutionDescriptor |
showSuspended(boolean showSuspended)
Returns a descriptor with configured show suspend flag. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExecutionDescriptor()
null or false.
| Method Detail |
|---|
@NonNull
@CheckReturnValue
public ExecutionDescriptor inputOutput(@NullAllowed
InputOutput io)
null it means that client is fine with infrustructure
provided io (visible as tab in output pane).
If configured value is not null values configured via
methods controllable(boolean), rerunCondition(RerunCondition)
and getOptionsPath() and are ignored by ExecutionService.
The default (not configured) value is null.
All other properties of the returned descriptor are inherited from
this.
io - custom input output, null allowed
@NonNull @CheckReturnValue public ExecutionDescriptor controllable(boolean controllable)
true the control buttons (rerun, stop) will be available
io tab created by ExecutionService.
Note that this property has no meaning when custom io is used
(see inputOutput(org.openide.windows.InputOutput)).
The default (not configured) value is false.
All other properties of the returned descriptor are inherited from
this.
controllable - controllable flag
@NonNull @CheckReturnValue public ExecutionDescriptor frontWindow(boolean frontWindow)
true the io tab will be selected before the execution
invoked by ExecutionService.run().
The default (not configured) value is false.
All other properties of the returned descriptor are inherited from
this.
frontWindow - front window flag
@NonNull @CheckReturnValue public ExecutionDescriptor inputVisible(boolean inputVisible)
true the input from user will be allowed.
The default (not configured) value is false.
All other properties of the returned descriptor are inherited from
this.
inputVisible - input visible flag
@NonNull @CheckReturnValue public ExecutionDescriptor showProgress(boolean showProgress)
true the progress bar will be visible.
The default (not configured) value is false.
All other properties of the returned descriptor are inherited from
this.
showProgress - show progress flag
@NonNull @CheckReturnValue public ExecutionDescriptor showSuspended(boolean showSuspended)
true the progress bar will be suspended to just
"running" message.
The default (not configured) value is false.
All other properties of the returned descriptor are inherited from
this.
showSuspended - show suspended flag
@NonNull @CheckReturnValue public ExecutionDescriptor noReset(boolean noReset)
true the output window won't be cleared before
the execution. Valid only for custom InputOutput configured via
inputOutput(org.openide.windows.InputOutput), ignored in all
other cases.
The default (not configured) value is false.
All other properties of the returned descriptor are inherited from
this.
noReset - no reset flag
@NonNull @CheckReturnValue public ExecutionDescriptor outLineBased(boolean outLineBased)
true the default printing
processor will always wait for the whole line before converting and
printing it.
outLineBased - line based flag
outProcessorFactory(org.netbeans.api.extexecution.ExecutionDescriptor.InputProcessorFactory)@NonNull @CheckReturnValue public ExecutionDescriptor errLineBased(boolean errLineBased)
true the default
printing processor will always wait for the whole line before
converting and printing it.
errLineBased - line based flag
errProcessorFactory(org.netbeans.api.extexecution.ExecutionDescriptor.InputProcessorFactory)
@NonNull
@CheckReturnValue
public ExecutionDescriptor outProcessorFactory(@NullAllowed
ExecutionDescriptor.InputProcessorFactory outProcessorFactory)
ExecutionService to create
additional processor for standard output.
Note that ExecutionService automatically uses
the printing processor created by
InputProcessors.printing(org.openide.windows.OutputWriter, org.netbeans.api.extexecution.print.LineConvertor, boolean)
or
LineProcessors.printing(org.openide.windows.OutputWriter, org.netbeans.api.extexecution.print.LineConvertor, boolean)
(in case outLineBased(boolean) is configured to true)
if there is no configured factory.
The default (not configured) value is null.
All other properties of the returned descriptor are inherited from
this.
outProcessorFactory - factory for standard output processor,
null allowed
@NonNull
@CheckReturnValue
public ExecutionDescriptor errProcessorFactory(@NullAllowed
ExecutionDescriptor.InputProcessorFactory errProcessorFactory)
ExecutionService to create
additional processor for standard error output.
Note that ExecutionService automatically uses
the printing processor created by
InputProcessors.printing(org.openide.windows.OutputWriter, org.netbeans.api.extexecution.print.LineConvertor, boolean)
or
LineProcessors.printing(org.openide.windows.OutputWriter, org.netbeans.api.extexecution.print.LineConvertor, boolean)
(in case errLineBased(boolean) is configured to true)
if there is no configured factory.
The default (not configured) value is null.
All other properties of the returned descriptor are inherited from
this.
errProcessorFactory - factory for standard error output processor,
null allowed
@NonNull
@CheckReturnValue
public ExecutionDescriptor outConvertorFactory(@NullAllowed
ExecutionDescriptor.LineConvertorFactory convertorFactory)
ExecutionService to create
convertor to use with processor printing the standard output.
Note that ExecutionService always uses the printing processor
for the standard output. Convertor created by the returned factory will
be passed to this default printing processor. See
outProcessorFactory(org.netbeans.api.extexecution.ExecutionDescriptor.InputProcessorFactory) too.
The default (not configured) value is null.
All other properties of the returned descriptor are inherited from
this.
convertorFactory - factory for convertor for standard output,
null allowed
@NonNull
@CheckReturnValue
public ExecutionDescriptor errConvertorFactory(@NullAllowed
ExecutionDescriptor.LineConvertorFactory convertorFactory)
ExecutionService to create
convertor to use with processor printing the standard error output.
Note that ExecutionService always uses the printing processor
for the standard error output. Convertor created by the returned
factory will be passed to this default printing processor. See
errProcessorFactory(org.netbeans.api.extexecution.ExecutionDescriptor.InputProcessorFactory) too.
The default (not configured) value is null.
All other properties of the returned descriptor are inherited from
this.
convertorFactory - factory for convertor for standard error output,
null allowed
@NonNull
@CheckReturnValue
public ExecutionDescriptor preExecution(@NullAllowed
Runnable preExecution)
ExecutionService.run()).
The default (not configured) value is null.
All other properties of the returned descriptor are inherited from
this.
preExecution - pre execution runnable, null allowed
@NonNull
@CheckReturnValue
public ExecutionDescriptor postExecution(@NullAllowed
Runnable postExecution)
ExecutionService.run()).
The default (not configured) value is null.
All other properties of the returned descriptor are inherited from
this.
postExecution - post execution runnable, null allowed
@NonNull
@CheckReturnValue
public ExecutionDescriptor rerunCondition(@NullAllowed
ExecutionDescriptor.RerunCondition rerunCondition)
ExecutionService to control the possibility of the
rerun action.
The default (not configured) value is null.
All other properties of the returned descriptor are inherited from
this.
rerunCondition - rerun condition, null allowed
@NonNull
@CheckReturnValue
public ExecutionDescriptor optionsPath(@NullAllowed
String optionsPath)
null the ExecutionService will
display the button in the output tab displaying the proper options
when pressed.
Format of the parameter is described in
OptionsDisplayer.open(java.lang.String).
Note that this property has no meaning when custom io is used
(see inputOutput(org.openide.windows.InputOutput)).
The default (not configured) value is null.
All other properties of the returned descriptor are inherited from
this.
optionsPath - options path, null allowed
@NonNull
@CheckReturnValue
public ExecutionDescriptor charset(@NullAllowed
Charset charset)
null the ExecutionService will
use the given charset to decode the process streams. When
null the platform default will be used.
Note that in the most common scenario of execution of OS native process you shouldn't need to set the charset. The platform default (which is the default used) is just the right choice.
The default (not configured) value is null.
All other properties of the returned descriptor are inherited from
this.
charset - charset, null allowed
|
org.netbeans.modules.extexecution/2 1.21.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||