I need a Java class that has a function called "processInfo(String info)".
The parameter "info" has the format "type|sequenceNumber". For instance "info1|0005|6".
There will be a directory declared in the class to store "stop processing" files and "sequence files". Note that each type will have its own stop processing and sequence number files (explained below).
The "type" can be either "type1" or "type2".
The method will receive a parameter "type" and split it. After that it will check if there is a "stop processing" file for that format. If there is such file, the method will e=return. Otherwise, it will check whether the sequence number received in the parameter is the correct one. The sequence number of a specific type will be increasing by one each time. That is, if the sequence number in the file "type1_sequence" is 5, then the sequence number in the next parameter of the same type should be "6". If a wrong sequence number is received, a "stop processing" file for that type will be generated. If the sequence number is correct, a method "foo()" will be called.
Simply, we want to make sure the method calls for a specific sequence number always have parameters "info" such that the "sequenceNumber" is increasing by one each time for that specific type. If a "stop processing" file is generated for a specific type, the method will not perform any perform any processing (will always return) for any calls of that type until that "stop processing" file is deleted.
File names, directory paths and file names etc will be static variables.
The code should be structured (using methods etc) and best coding practices should be followed.
Please let me know how fast you can complete the work and how much you'll charge. Feel free to let me know if you have any questions.
Thanks,