org.kuali.rice.ksb.impl.bus
Class InstanceIdFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<String>
org.kuali.rice.ksb.impl.bus.InstanceIdFactoryBean
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<String>, org.springframework.beans.factory.InitializingBean
public class InstanceIdFactoryBean
- extends org.springframework.beans.factory.config.AbstractFactoryBean<String>
A factory bean which is used to produce an instance id for the service bus.
The value for the instance id is determined in the following order of preferences:
- If
instanceId
is set on this factory bean, that value will be used.
- If
KSBConstants.Config#INSTANCE_ID
has been set in the configuration context, that value will be used.
- If none of the above, the instance id will be a combination of this application's namespace plus ip address.
In the case that the instance id is generated, the application id will be pulled
from the configuration context using the KSBConstants.Config#INSTANCE_ID
configuration parameter which
should always have a value.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
logger |
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InstanceIdFactoryBean
public InstanceIdFactoryBean()
setInstanceId
public void setInstanceId(String instanceId)
createInstance
protected String createInstance()
throws Exception
- Specified by:
createInstance
in class org.springframework.beans.factory.config.AbstractFactoryBean<String>
- Throws:
Exception
loadInstanceIdFromConfig
protected String loadInstanceIdFromConfig()
getObjectType
public Class<String> getObjectType()
- Specified by:
getObjectType
in interface org.springframework.beans.factory.FactoryBean<String>
- Specified by:
getObjectType
in class org.springframework.beans.factory.config.AbstractFactoryBean<String>
Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.