public class SwitchableApplicationContextFactory extends AbstractPropertyBackedBean implements ApplicationContextFactory
ApplicationContextFactory
beans that allows dynamic selection of one or
more alternative subsystems via a sourceBeanName
property. As with other PropertyBackedBean
s,
can be stopped, reconfigured, started and tested.Modifier and Type | Class and Description |
---|---|
protected class |
SwitchableApplicationContextFactory.SwitchableState
Represents the state of a
SwitchableApplicationContextFactory . |
AbstractPropertyBackedBean.DefaultResolver, AbstractPropertyBackedBean.RuntimeState
Modifier and Type | Field and Description |
---|---|
protected String |
sourceBeanName
The default bean name of the source
ApplicationContextFactory . |
DEFAULT_INSTANCE_NAME, lock, runtimeState
Constructor and Description |
---|
SwitchableApplicationContextFactory() |
Modifier and Type | Method and Description |
---|---|
protected PropertyBackedBeanState |
createInitialState()
Creates the initial state.
|
org.springframework.context.ApplicationContext |
getApplicationContext()
Gets the application context, configured according to the properties of the factory.
|
String |
getCurrentSourceBeanName() |
void |
setSourceBeanName(String sourceBeanName)
Sets the default bean name of the source
ApplicationContextFactory . |
afterPropertiesSet, applyDefaultOverrides, destroy, destroy, doInit, getCategory, getDescription, getEncryptedPropertyDefaults, getId, getInstancePath, getParent, getProperty, getPropertyDefaults, getPropertyNames, getRegistry, getState, init, isUpdateable, onApplicationEvent, performEarlyPropertyChecks, removeProperties, removeProperty, resolveDefault, revert, setApplicationContext, setAutoStart, setBeanName, setCategory, setEarlyPropertyCheckers, setEncryptedPropertyDefaults, setInstancePath, setProperties, setProperty, setPropertyDefaults, setRegistry, setSaveSetProperty, start, start, stop, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, getId, isUpdateable, removeProperties, revert, setProperties
getProperty, getPropertyNames, removeProperty, setProperty, start, stop
protected String sourceBeanName
ApplicationContextFactory
.public void setSourceBeanName(String sourceBeanName)
ApplicationContextFactory
.sourceBeanName
- the bean namepublic String getCurrentSourceBeanName()
public org.springframework.context.ApplicationContext getApplicationContext()
ApplicationContextFactory
getApplicationContext
in interface ApplicationContextFactory
protected PropertyBackedBeanState createInitialState() throws IOException
AbstractPropertyBackedBean
createInitialState
in class AbstractPropertyBackedBean
IOException
- Signals that an I/O exception has occurred.Copyright © 2005–2017 Alfresco Software. All rights reserved.