public class ReloadableBeanFactoryImpl extends Object implements Resettable, org.springframework.beans.factory.FactoryBean
The difference is that the proxies returned from this factory can be made to point to a different object, freshly retrieved from the FactoryBean. This lets us reload OSGi services without touching existing references to old services in Spring beans that are already wired.
If factory is created using ReloadableBeanFactoryImpl(Class, Object...)
constructor, the new bean will be retrieved from a new FactoryBean object (it's the recommended way of using this
class, because it will deal with stateful FactoryBeans).
ReloadableBeanFactoriesImpl
bean processor automatically registers all instances of Resettable
and will call reload on each of them when asked. This happens during hotswap import.
Modifier and Type | Field and Description |
---|---|
protected io.atlassian.util.concurrent.ResettableLazyReference<Object> |
bean |
protected org.springframework.beans.factory.FactoryBean |
factoryBean |
protected io.atlassian.util.concurrent.ResettableLazyReference<Object> |
proxyReference |
Constructor and Description |
---|
ReloadableBeanFactoryImpl(Class<?> cls,
Object... args)
Use this one to be able to reload bean and factory that will be created from class constructor with provided
arguments
|
Modifier and Type | Method and Description |
---|---|
Object |
getObject() |
Class |
getObjectType() |
boolean |
isSingleton() |
void |
reset() |
protected final io.atlassian.util.concurrent.ResettableLazyReference<Object> bean
protected volatile org.springframework.beans.factory.FactoryBean factoryBean
protected final io.atlassian.util.concurrent.ResettableLazyReference<Object> proxyReference
public Object getObject() throws Exception
getObject
in interface org.springframework.beans.factory.FactoryBean
Exception
public Class getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean
public void reset()
reset
in interface Resettable
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.