com.deltax.util.listener
Class AsynchObserver

java.lang.Object
  extended bycom.deltax.util.listener.AsynchObserver
All Implemented Interfaces:
java.util.Observer

public class AsynchObserver
extends java.lang.Object
implements java.util.Observer

A wrapper class which allows to user a Listener in contexts where an Observer is required. Note that the synchoronous/asynchronous invocation will depend then on the specific Observer class, outside the boundaries of the framework.

Upon invocation of update() the class simply forwards the notification to the listener, passing an ObservableSignal containing both source (an Observable) and argument.

Author:
Cristiano Sadun

Nested Class Summary
static class AsynchObserver.Cache
          A class that can be used to cache AsynchObserver objects.
 
Method Summary
static AsynchObserver.Cache createCache()
           
static AsynchObserver.Cache createCache(int n)
           
 void update(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

update

public final void update(java.util.Observable o,
                         java.lang.Object arg)
Specified by:
update in interface java.util.Observer

createCache

public static AsynchObserver.Cache createCache(int n)

createCache

public static AsynchObserver.Cache createCache()