I have java app which supports multiple workflows. Workflow is chosen using arguments passed to it from command line. In one of the workflow app needs to run for infinite time. I am achieving the same using following code
switch (args[0]) { 
    case "-runForever":
     // Some Computation
     Thread.sleep(Long.MAX_VALUE);
     break;
    case "otherCase:
     //dosomething
     break;
}
Is it a good way of achieving the required functionality?
 
     
     
     
    