com.hammurapi.config.bootstrap
Interface FactoryClosure<T>

All Known Implementing Classes:
FactoryClosureBase

public interface FactoryClosure<T>

Factory closure to create objects without additional configuration information.

Author:
Pavel Vlasov

Method Summary
 T create(Object... args)
          Performs initialization of already configured objects and returns the root object.
 Destroyable getDestroyable()
           
 

Method Detail

create

T create(Object... args)
         throws ConfigurationException
Performs initialization of already configured objects and returns the root object.

Parameters:
args - Optional constructor arguments. If arguments are provided, the closure finds a compatible constructor and invokes it. The rest of configuration - property injection, etc. happens in the same way as if no argument were provided.
Returns:
Configured and initialized object.
Throws:
ConfigurationException

getDestroyable

Destroyable getDestroyable()
                           throws ConfigurationException
Returns:
Destroyable if factory result has resource cleanup logic, or null.
Throws:
ConfigurationException