rcf.core.util.groups
Interface ImmutableSingletonInterface<A>

All Known Subinterfaces:
DynamicProperty<T>, Future<T>, ImmutableIterator<T>, ImmutablePairInterface<A,B>, ImmutablePosition<T>, ImmutableTripleInterface<A,B,C>, InterruptibleFuture, Iterator<T>, rcf.core.concurrent.primitives.Latch<T>, PairInterface<A,B>, Position<T>, Reference<T>, RunnableFuture<T>, SingletonInterface<A>, TripleInterface<A,B,C>
All Known Implementing Classes:
AbstractDynamicProperty, AbstractFedoraHostedRADService.State, AbstractNetworkTunnel.State, AbstractRADService.AbstractRADServiceState, AdvancedResearchIndexLoadLinux.State, AtomicReference, CompleteDynamicProperty, ComposedRADService.State, DefaultDynamicProperty, DynamicOperation.Default.Continuation, DynamicProperty.Default, FilteredDynamicProperty, FilteredReference, GUICollection, GUIHelpers.WindowCloserFrameworkEventSink, GUIImmutableCollection, GUIImmutableTree, GUITree, HAProxyLinux.State, ImmutablePair, ImmutablePair.Accessor, ImmutablePair.Iterable, ImmutablePair.Iterator, ImmutableSingleton, ImmutableSingleton.Accessor, ImmutableSingleton.Iterable, ImmutableSingleton.Iterator, ImmutableTriple, ImmutableTriple.Accessor, ImmutableTriple.Iterable, ImmutableTriple.Iterator, LigHTTPDLinux.State, LinuxSession.State, LinuxSystem.State, MethodRunnableFuture, Pair, Pair.Iterable, Pair.Iterator, PhantomReference, RADTools.State, ReferenceTypeFilter, ResearchIndexLoadLinux.State, RoRServerLinux.State, Singleton, Singleton.Iterable, Singleton.Iterator, SoftReference, StrongReference, TaskStateFilter, ThreadLocalReference, Triple, Triple.Iterable, Triple.Iterator, VMWareFedora.State, VMWareLinux.State, WeakReference

@Revision(value="$Revision: 1.8 $",
          date="$Date: 2006/12/06 16:55:30 $",
          tag="$Name:  $")
public interface ImmutableSingletonInterface<A>

TODO: Javadoc Contains methods for accessing a reference stored in a singleton object, which can be virtualized. By using this interface, we can allow classes to act as immutable singletons, without requiring them to inherit from the ImmutableSingleton class.

This interface can also be used as a class factory, simply be writing the get() method to return a new instance on each call. The Collection.factory() method puts it to this use.

Furthermore this interface is the basis of Future and can be used to provide late computed results. By computing some result only when get() is called and perhaps caching the result, this interface can easily help reduce uneeded computation.

Perhaps the most important use of this interface is in supported the rcf.core.framework package, in particular for any StaticProperty the framework reflection generates can produce an instance of DynamicProperty allowing the caller to read that property using either field access or a StaticGetMethod method.

See SingletonInterface for more interesting uses of this interace.

Version:
$Revision: 1.8 $
Author:
Greg Gibeling

Method Summary
 A get()
          TODO: Javadoc Get the content element of this singleton.
 

Method Detail

get

A get()
TODO: Javadoc Get the content element of this singleton.

Returns:
The content element of this singleton.