public static class SampleCmdLine.UserMain extends java.lang.Object
MainCmdLogging_ifcto write some informations either to a log file or to console or both. Additionally there is used a redirect of
System.outand System.err to the logging mechanism of MainCmd. See
MsgDispatchSystemOutErr. With that capability the user can invoke the standard java mechanism for System.out.println("any message") only and nevertheless the message and log capability of MainCmd is used..
|Modifier and Type||Field and Description|
Aggregation to the Console implementation class.
|Constructor and Description|
Constructs the Sample class.
|Modifier and Type||Method and Description|
Executes the task of this class.
Sample to handle with files
final MainCmd_ifc console
public UserMain(MainCmd_ifc console)
void execute(SampleCmdLine.Args cmdLineArgs)
cmdLineArgs- The args originally from command line call, but it is possible to patch this args with some other operations. It should not be the pure originally.
void executeFiles(SampleCmdLine.Args cmdLineArgs) throws java.io.IOException
cmdLineArgs- cmdline args, see
execute(org.vishia.mainCmd.SampleCmdLine.Args). It may be a good idea to provide this args in the thread, instead as class members.