|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MainCmd_ifc
The interface MainCmd_Ifc is an interface for all java programms to do something
in respect to command line things.
Specifically the writing of messages is supported. The implemented class effectuate the
writing at example to the System.out or to a window in GUI-applications.
The interface Report is extended here, so all report things are also accessable via this interface.
date who change 2007-12-29 JcHartmut displace some methods to org.vishia.mainCmd.Report. 2007-03-07 JcHartmut Method getReportFileName 2006-01-07 JcHartmut some corrections 2004-06-00 JcHartmut initial revision
| Field Summary |
|---|
| Fields inherited from interface org.vishia.mainCmd.Report |
|---|
anytime, debug, error, eventOrder, exitSuccessfull, exitUserAbort, exitWithArgumentError, exitWithErrors, exitWithFileProblems, exitWithNotes, exitWithWarnings, fineDebug, fineEventOrder, fineInfo, info, interested, mNeverOutputToDisplay, mReportLevel, warning |
| Method Summary | |
|---|---|
int |
executeCmdLine(java.lang.ProcessBuilder processBuilder,
java.lang.String[] cmd,
java.lang.String input,
int nReportLevel,
java.lang.StringBuffer output,
java.lang.StringBuffer error)
Executes a command line call maybe as pipe, waiting for finishing.. |
int |
executeCmdLine(java.lang.ProcessBuilder processBuilder,
java.lang.String cmd,
java.lang.String input,
int nReportLevel,
java.lang.StringBuffer output,
java.lang.StringBuffer error)
Executes a command line call maybe as pipe, waiting for finishing.. |
int |
executeCmdLine(java.lang.String[] cmd,
int nReportLevel,
java.lang.StringBuffer output,
java.lang.String input)
Execute a command, invoke a cmdline call. |
int |
executeCmdLine(java.lang.String cmdLine,
int nReportLevel,
java.lang.StringBuffer output,
java.lang.String input)
Execute a command, invoke a cmdline call. |
java.lang.String |
getReportFileName()
Returns the name of the report file to write out as info. |
int |
startCmdLine(java.lang.ProcessBuilder processBuilder,
java.lang.String cmd)
Starts a command invocation for a independent window. |
int |
startCmdLine(java.lang.ProcessBuilder processBuilder,
java.lang.String[] cmd)
Starts a command invocation for a independent window. |
int |
switchToWindowOrStartCmdline(java.lang.ProcessBuilder processBuilder,
java.lang.String sCmd,
java.lang.String sWindowTitle)
Searches the window for the already running process or starts the process with command invocation for a independent window. |
| Methods inherited from interface org.vishia.mainCmd.Report |
|---|
flushReport, getExitErrorLevel, getLogMessageOutputConsole, getLogMessageOutputFile, getReportLevel, getReportLevelFromIdent, openReportfile, report, report, reportln, reportln, setExitErrorLevel, setReportLevelToIdent, writeError, writeError, writeInfo, writeInfoln, writeWarning |
| Method Detail |
|---|
java.lang.String getReportFileName()
int executeCmdLine(java.lang.String[] cmd,
int nReportLevel,
java.lang.StringBuffer output,
java.lang.String input)
cmd - String with the separeted parts of the command. cmd[0] is the command to invoke.nReportLevel - Determines the kind of writing the output. Possible values are 1..6 using Report.error to Report.fineInfo
and -1..-3 using -Report.error to -report.info (with a negativ sign!). On negativ values the
report is written to display with the write..()-methods of this interface, with the
positive value, the report is written to Report.report..()-Methods.output - If not null, than the stdout is written in this Buffer. If null, the stdout is written to report.input - If not null, this input is send to the cmdline process. If null, no input is send.
int executeCmdLine(java.lang.String cmdLine,
int nReportLevel,
java.lang.StringBuffer output,
java.lang.String input)
cmdLine - String represents the command with all arguments. The arguments must be separated by exactly one space.
The rest of paramter and return see executeCmdLine(String[], ...).
int executeCmdLine(java.lang.ProcessBuilder processBuilder,
java.lang.String cmd,
java.lang.String input,
int nReportLevel,
java.lang.StringBuffer output,
java.lang.StringBuffer error)
processBuilder - The ProcessBuilder. There may be assigned environment variables and a current directory.cmd - The cmd and arguments. If it is null, the command assigened to the processBuilder is used.input - Any pipe-input. It may be null.nReportLevel - The report level which is used for output.
If it is 0, then the output isn't written TODOoutput - The output pipe.error - The error pipe. If it is null, then errors are written in the output pipe.
int executeCmdLine(java.lang.ProcessBuilder processBuilder,
java.lang.String[] cmd,
java.lang.String input,
int nReportLevel,
java.lang.StringBuffer output,
java.lang.StringBuffer error)
processBuilder - The ProcessBuilder. There may be assigned environment variables and a current directory.cmd - The cmd and arguments. If it is null, the command assigend to the processBuilder is used.input - Any pipe-input. It may be null.nReportLevel - The report level which is used for output.
If it is 0, then the output isn't written TODOoutput - The output pipe.error - The error pipe. If it is null, then errors are written in the output pipe.
int startCmdLine(java.lang.ProcessBuilder processBuilder,
java.lang.String cmd)
cmd - The command. Some arguments are possible, they should be separated by space.processBuilder - The processBuilder.
int startCmdLine(java.lang.ProcessBuilder processBuilder,
java.lang.String[] cmd)
cmd - The command and some arguments.processBuilder - The processBuilder.
int switchToWindowOrStartCmdline(java.lang.ProcessBuilder processBuilder,
java.lang.String sCmd,
java.lang.String sWindowTitle)
cmd - The command and some arguments.processBuilder - The processBuilder.sWindowTitle - The title or the start of the window if the process is running already.
Note: The title is depending from the application.
Sometimes the title starts with the associated file, forex calling windows-notepad.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||