|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.netbeans.modules.vcscore.cmdline.exec.ExternalCommand
Single external command to be executed. See TestCommand
for typical usage.
Constructor Summary | |
ExternalCommand()
Creates new ExternalCommand |
|
ExternalCommand(String command)
|
|
ExternalCommand(String command,
String input)
|
|
ExternalCommand(StructuredExec sexec)
|
Method Summary | |
void |
addImmediateTextErrorListener(TextOutputListener l)
Add a listener to the standard error output, that will be noified immediately as soon as the output text is available. |
void |
addImmediateTextOutputListener(TextOutputListener l)
Add a listener to the standard output, that will be noified immediately as soon as the output text is available. |
void |
addOutputProgressListener(OutputProgressListener l)
Add an output progress listener that is notified about the progress of output that is available from the command. |
void |
addRegexErrorListener(RegexOutputListener l,
String regex)
Add a listener to the standard error output with a specific regular expression. |
void |
addRegexOutputListener(RegexOutputListener l,
String regex)
Add a listener to the standard output with a specific regular expression. |
void |
addTextErrorListener(TextOutputListener l)
Add a listener to the standard error output. |
void |
addTextOutputListener(TextOutputListener l)
Add a listener to the standard output. |
int |
exec()
Executes the external command. |
int |
getExitStatus()
Get the exit status of the command. |
static String[] |
matchToStringArray(Pattern pattern,
String line)
|
static String[] |
parseParameters(StructuredExec sexec)
|
void |
removeRegexErrorListener(RegexOutputListener l)
Remove an error output data listener. |
void |
removeRegexOutputListener(RegexOutputListener l)
Remove a standard output data listener. |
void |
sendInput(String inputData)
Send some input data to a running command. |
void |
setCommand(String command)
|
void |
setCommand(StructuredExec scommand)
|
void |
setEnv(String[] envp)
|
void |
setInput(String inputData,
boolean repeat)
Set the input, which will be send to the command standard input. |
void |
setMergeOutputStreams(boolean mergeOutputStreams)
Whether to merge the error output with standard output. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ExternalCommand()
public ExternalCommand(String command)
public ExternalCommand(String command, String input)
public ExternalCommand(StructuredExec sexec)
Method Detail |
public void setCommand(String command)
public void setCommand(StructuredExec scommand)
public void setInput(String inputData, boolean repeat)
inputData
- The String data that will be sent to the command standard inputrepeat
- Whether the input sequence should be repeated while the command reads it.public void sendInput(String inputData)
inputData
- The input text.public void setEnv(String[] envp)
public void setMergeOutputStreams(boolean mergeOutputStreams)
public int getExitStatus()
public static String[] parseParameters(StructuredExec sexec)
public int exec()
public String toString()
public void addRegexOutputListener(RegexOutputListener l, String regex) throws BadRegexException
BadRegexException
public void addRegexErrorListener(RegexOutputListener l, String regex) throws BadRegexException
BadRegexException
public void addTextOutputListener(TextOutputListener l)
public void addTextErrorListener(TextOutputListener l)
public void addImmediateTextOutputListener(TextOutputListener l)
public void addImmediateTextErrorListener(TextOutputListener l)
public void addOutputProgressListener(OutputProgressListener l)
public void removeRegexOutputListener(RegexOutputListener l)
public void removeRegexErrorListener(RegexOutputListener l)
public static String[] matchToStringArray(Pattern pattern, String line)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |