interface IAppFactory
package com.domwires.core.factory
extends IDisposable, IAppFactoryImmutable
extended by AppFactory
Methods
appendMappingConfig(config:Map<String, DependencyVo>):IAppFactory
Will create type mapping, value mappings and inject dependencies, using config data. @return
Parameters:
config | map of |
---|
increasePoolCapacity<T>(type:ClassRef<T>, additionalCapacity:Int):IAppFactory
Increases pool capacity/
Parameters:
type | Type of pool |
---|---|
null | additionalCapacity |
registerPool<T>(type:ClassRef<T>, capacity:Int = 5, instantiateNow:Bool = false, ?isBusyFlagGetterName:String):IAppFactory
Registers pool for instances of provided type.
Parameters:
type | Type of object to register pool for |
---|---|
capacity | Maximum objects of current type in pool |
instantiateNow | Create instances immediately |
constructorArgs | Constructor arguments, in case |
isBusyFlagGetterName | The name of public getter. If specified, then this method will be called, to check if current object can be re-used right now. If specified and returns true, then next item of pool will be checked. Can be any type. Use Array, if need to pass several args. |
registerPoolByClassName<T>(className:String, capacity:Int = 5, instantiateNow:Bool = false, ?isBusyFlagGetterName:String):IAppFactory
setSafePool(value:Bool):IAppFactory
Avoid stack overflow and increase pool capacity up to 1, if all pool items are busy. Default is true.
Parameters:
null | value |
---|
unregisterPool<T>(type:ClassRef<T>):IAppFactory
Unregisters and disposes pool for provided type.
Parameters:
type | Type of object to register pool for |
---|