info.magnolia.objectfactory
Interface ComponentFactory<T>

Type Parameters:
T - the type of component this factory instantiates.
All Known Implementing Classes:
ConfiguredComponentFactory, IPSecurityManagerImpl.InstanceFactory, LazyObservedComponentFactory, ObservedComponentFactory, ServerConfiguration.InstanceFactory

public interface ComponentFactory<T>

Implementations of ComponentFactory provide their own instantiation mechanisms. Implementations could for instance get constructor parameters from some well-known place, or call an initialization method, etc. ComponentFactory implementations can be registered in place of the component they're instantiating. (i.e using the same key)

Version:
$Id$
See Also:
ComponentProvider.getComponent(Class)

Method Summary
 T newInstance()
          Called by the ComponentProvider to create a component.
 

Method Detail

newInstance

T newInstance()
Called by the ComponentProvider to create a component. This will only be done once and hence instances created by component factories are effectively singletons.



Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.