public abstract class BaseBeanFactory<T> extends Object implements BeanFactory<T>
Base BeanProvider implementation.
Modifier and Type | Field and Description |
---|---|
protected WorkerCtx |
context |
protected T |
instance |
Constructor and Description |
---|
BaseBeanFactory() |
Modifier and Type | Method and Description |
---|---|
T |
get(Map<String,Object> stormConf)
Return an instance, which may be shared or independent, of the specified type.
|
protected abstract T |
make(Map<String,Object> stormConf)
Return a new instance of T.
|
BeanFactory<T> |
newInstance()
Returns a new copy if this factory.
|
void |
setStormContext(WorkerCtx context)
Sets the storm context.
|
public void setStormContext(WorkerCtx context)
Sets the storm context.
setStormContext
in interface BeanFactory<T>
public T get(Map<String,Object> stormConf)
Return an instance, which may be shared or independent, of the specified type.
get
in interface BeanFactory<T>
stormConf
- The storm configurationpublic BeanFactory<T> newInstance()
Returns a new copy if this factory.
newInstance
in interface BeanFactory<T>
BeanFactory
instance.Copyright © 2022 The Apache Software Foundation. All Rights Reserved.