KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > util > Observer


1 /*
2  * @(#)Observer.java 1.19 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package java.util;
8
9 /**
10  * A class can implement the <code>Observer</code> interface when it
11  * wants to be informed of changes in observable objects.
12  *
13  * @author Chris Warth
14  * @version 1.19, 12/19/03
15  * @see java.util.Observable
16  * @since JDK1.0
17  */

18 public interface Observer {
19     /**
20      * This method is called whenever the observed object is changed. An
21      * application calls an <tt>Observable</tt> object's
22      * <code>notifyObservers</code> method to have all the object's
23      * observers notified of the change.
24      *
25      * @param o the observable object.
26      * @param arg an argument passed to the <code>notifyObservers</code>
27      * method.
28      */

29     void update(Observable JavaDoc o, Object JavaDoc arg);
30 }
31
Popular Tags