public class LazyServiceFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<Object>, org.springframework.beans.factory.InitializingBean
ServiceBus
. This proxy is created based on either the
proxy interfaces that are injected into this bean, or derived from the objectType which is injected into this bean.
If neither of these are injected, then an exception will be through during bean initialization.
The attempt to fetch the resource from the ServiceBus won't be attempted until a method on the resulting
proxy is invoked. If it fails to locate the resource, it will throw a ResourceLoaderException indicating the service
could not be loaded.
This allows for referencing of a potentially remote service in the spring context during startup which won't get used until after startup. If the remote service gets used *during* startup, then it must be available from the GRL during startup or else the ResourceLoaderException will be thrown.
Constructor and Description |
---|
LazyServiceFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected Class<?>[] |
detectProxyInterfaces() |
String |
getApplicationId() |
Object |
getObject() |
Class<?> |
getObjectType() |
Class<?>[] |
getProxyInterfaces() |
String |
getServiceName() |
String |
getServiceNamespace() |
boolean |
isSingleton() |
void |
setApplicationId(String applicationId) |
void |
setObjectType(Class<?> objectType) |
void |
setProxyInterfaces(Class<?>[] proxyInterfaces) |
void |
setServiceName(String serviceName) |
void |
setServiceNamespace(String serviceNamespace) |
public LazyServiceFactoryBean()
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
protected Class<?>[] detectProxyInterfaces()
public Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<Object>
public void setObjectType(Class<?> objectType)
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<Object>
public String getServiceNamespace()
public void setServiceNamespace(String serviceNamespace)
public String getServiceName()
public void setServiceName(String serviceName)
public String getApplicationId()
public void setApplicationId(String applicationId)
public Class<?>[] getProxyInterfaces()
public void setProxyInterfaces(Class<?>[] proxyInterfaces)
Copyright © 2005–2015 The Kuali Foundation. All rights reserved.