info.magnolia.objectfactory
Class LazyObservedComponentFactory<T>
java.lang.Object
info.magnolia.objectfactory.LazyObservedComponentFactory<T>
- Type Parameters:
T
- the type of component this factory instantiates.
- All Implemented Interfaces:
- ComponentFactory<T>
public class LazyObservedComponentFactory<T>
- extends Object
- implements ComponentFactory<T>
ComponentFactory that provides an instance by reading it from a repository. The instance is created only when it is
needed and is recreated if its configuration changes in the repository.
- Version:
- $Id$
Method Summary |
T |
newInstance()
Called by the ComponentProvider to create a component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LazyObservedComponentFactory
public LazyObservedComponentFactory(String repository,
String path,
Class<T> type,
ComponentProvider componentProvider)
newInstance
public T newInstance()
- Description copied from interface:
ComponentFactory
- Called by the ComponentProvider to create a component. This will only be done once and hence instances created
by component factories are effectively singletons.
- Specified by:
newInstance
in interface ComponentFactory<T>
Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.