Package org.lsst.ccs.utilities.dispatch

The Observer/observable pattern may come in different flavors offered by this package.

See:
          Description

Interface Summary
ASyncObserver<P> An Observable that needs parrallel processing of updates.
CommandFor<T> This interface defines the behaviour of a class implementing a Command pattern.
SynchronousCommandFor<T> This marker interface is used to specify that implementers of the code executing the command explicitly acknowledge that the caller is waiting for completion of the command.
SynchronousObserver<P> An Observer that knows that its code should terminate quickly because it is invoked in sequence by the SynchronousObservable.
 

Class Summary
ParallelCommandDispatcher<T> Dispatches a Command object to registered "executants" able to handle the command; each command execution may be handled by a different Thread so every registered agent does not have to wait for termination of code from the previous call.
ParallelDispatchProxy<I> Instances of this class creates a dynamic proxy that parallely dispatches method call to registered agents implementing an interface type.
ParallelObservable<P> An Observable that notifies Observers through an ExecutorService (that is through different threads).
SynchronousCommandDispatcher<T> Registers codes interested in receiving commands.
SynchronousDispatchProxy<I> Instances of this class creates a dynamic proxy that dispatches method call to registered agents implementing an interface type.
SynchronousObservable<P> An Observable with protocol control at compile time.
 

Package org.lsst.ccs.utilities.dispatch Description

The Observer/observable pattern may come in different flavors offered by this package.

Primarily there are two main concerns addressed in the codes of this package:

So the "traditional" Observer/Observable pair can be replaced by SynchronousObserver and SynchronousObservable. The main differences are: If parallel processing is needed use instead ASyncObserver and ParallelObservable .

Now why limit notifications to a single method? We may go through different methods....

So there are two different patterns in this package to handle calls to different methods for the registered agents:



Copyright © 2012 LSST. All Rights Reserved.