I am not a Java coder, but this is my attempt at implementing a monitoring solution