Observator Pattern in Java.