How: Java program for instant invocation by Magnetic stripe card reader
Experienced developers:
I guess people in this forum also know the answer to the question I have.
We need to enable users to swipe their ID card on a magnet stripe card reader (the card is the same kind like credit cards) and get their accounts updated. We will write java program to capture such swipes and do the processing accordingly.
I know the ID number can be read from the card and be added to a file. I was thinking scheduling the program to wake up periodically to read the file, and do the processing if there are numbers captured in the file.
But that won't do. The requirement is to capture the number and do the processing the instant the card is swiped. I wonder scheduling periodic runs of the program will work to fulfill such requirement. If not, what is the alternative solution? How does a program keep awake and stands by without doing anything, but spring into action the instant there is a car swipe?
Thank you very much for helping!
Newman