Registers a new observer. Observers will be notified when the data source ID becomes available after the data source has been created.
@param observer observer to add
Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set. The order in which notifications will be delivered to multiple observers is not specified. See the class comment.
@param o an observer to be added.
@throws NullPointerException if the parameter o is null.
Register a new {@link Observer} for receiving notifications about changes reported tothis change dispatcher. Changes are reported synchronously and clients need to ensure to no block any length of time (e.g. by relaying through a {@link BackgroundObserver}).
Clients need to call {@link java.io.Closeable#close()} close} on the returned{@code Closeable} instance to stop receiving notifications.
@return a {@link Closeable} instance
AddObserver Registers a given listener for a notifications regarding the specified topic.
@param anObserve : The interface pointer which will receive notifications.
@param aTopic : The notification topic or subject.
@param ownsWeak : If set to false, the nsIObserverService will hold a strong reference to |anObserver|. If set to true and |anObserver| supports the nsIWeakReference interface, a weak reference will be held. Otherwise an error will be returned.
Synchronizing this method since adding an observer may lead to a new list being created for an event entry and we don't want a race condition if multiple threads hit this during deployment/startup.
@param observer observer instance to add
@param event the event to register against
@return a reference to this EventManger for chaining calls
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.