com.jfw.status
Class UpdateObservable

java.lang.Object
  extended by java.util.Observable
      extended by com.jfw.status.UpdateObservable

public final class UpdateObservable
extends java.util.Observable

All the classes need to be updated must observer this class.
Is a singleton, the only instance is return by method getInstance().


Method Summary
 void addObserver(java.lang.Object thisClass)
          Call method addObserver(Object,String,String).
 void addObserver(java.lang.Object thisClass, java.lang.String className2Add, java.lang.String description)
          Used for add an instance as observer of this class.
 void deleteObserver(java.lang.Object observer)
          Call the method deleteObserver(Object,String).
 void deleteObserver(java.lang.Object observer, java.lang.String className2Del)
          Used for remove an observer.
static UpdateObservable getInstance()
          Get the attribute updateObservable
 java.util.HashMap getObservers()
          Get a clone of the attribute observers.
 void update()
          Notify the observers to be update.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static UpdateObservable getInstance()
Get the attribute updateObservable

Returns:
updateObservable;

getObservers

public java.util.HashMap getObservers()
Get a clone of the attribute observers.

Returns:
a clone of the attribute observers.

addObserver

public void addObserver(java.lang.Object thisClass,
                        java.lang.String className2Add,
                        java.lang.String description)
Used for add an instance as observer of this class.

Parameters:
thisClass - the instance to add as observer.
className2Add - the name of the observer class.
description - the description of the observer.

addObserver

public void addObserver(java.lang.Object thisClass)
Call method addObserver(Object,String,String). The values of parameters className2Add and description are the blank string.

Parameters:
thisClass - the instance to add as observer.

deleteObserver

public void deleteObserver(java.lang.Object observer,
                           java.lang.String className2Del)
Used for remove an observer.

Parameters:
observer - the observer to remove.
className2Del - if the value is not null then this name is used for remove the oberver class.

deleteObserver

public void deleteObserver(java.lang.Object observer)
Call the method deleteObserver(Object,String). The value of parameter className2Del is null.

Parameters:
observer - the observer to remove.

update

public void update()
Notify the observers to be update.