public static class SampleCmdLine.UserMain
extends java.lang.Object
SampleCmdLine.Args
for construction.
MainCmdLogging_ifc
to write some informations either to a log file
or to console or both. Additionally there is used a redirect of System.out
and 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 |
---|---|
(package private) MainCmd_ifc |
console
Aggregation to the Console implementation class.
|
Constructor and Description |
---|
UserMain(MainCmd_ifc console)
Constructs the Sample class.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
execute(SampleCmdLine.Args cmdLineArgs)
Executes the task of this class.
|
(package private) void |
executeFiles(SampleCmdLine.Args cmdLineArgs)
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.java.io.IOException