The observer design pattern