org.jpu.patterns.factory
Interface IPrototypeFactory.IConfigStrategy

All Known Implementing Classes:
PropertyFactoryConfigStrategy
Enclosing interface:
IPrototypeFactory

public static interface IPrototypeFactory.IConfigStrategy

Defines the interface to the factory's configurator. The factory's IPrototypeFactory.newConfigStrategy() method defines which configuration strategy it uses. The default is PropertyFactoryConfigStrategy but any strategy that implements this interface can be substituted.

The strategy is expected to hold a reference to the factory it configures and to be able to return this reference via getFactory(). Ordinarily the factory will be passed to the strategy's constructor.

The configure() method will be called by the factory the first time any client calls a method that requires the prototype map. However, any client can call configure() thereafter to perform a reconfiguration.

The reconfigureIfNecessary() method will be called every time a prototype is requested, and may be used to implement periodic reconfiguration. If you don't need periodic reconfiguration, or if you use some other approach to reconfiguration, you may supply an empty implementation.


Method Summary
 void configure()
           
 IPrototypeFactory getFactory()
           
 void reconfigureIfNecessary()
           
 

Method Detail

getFactory

public IPrototypeFactory getFactory()

configure

public void configure()

reconfigureIfNecessary

public void reconfigureIfNecessary()


Copyright (c) 2001-2003 - Apache Software Foundation