public interface ConfigurableOsgiBundleApplicationContext
extends org.springframework.context.ConfigurableApplicationContext
ConfigurableApplicationContext
to
provides OSGi specific functionality.
Note: Just like its ancestors,the setters of this interface
should be called before refresh
ing the
ApplicationContext
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_CONTEXT_SERVICE_PROPERTY_NAME
Service entry used for specifying the application context name when
published as an OSGi service
|
static String |
BUNDLE_BEAN_NAME
Name of the bundle bean
|
static String |
BUNDLE_CONTEXT_BEAN_NAME
Name of the bundle context bean
|
static String |
SPRING_DM_APPLICATION_CONTEXT_SERVICE_PROPERTY_NAME
Compatibility (with Spring DM) service entry used for specifying the application context name when
published as an OSGi service
|
CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, ENVIRONMENT_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAME
Modifier and Type | Method and Description |
---|---|
org.osgi.framework.Bundle |
getBundle()
Returns the OSGi
Bundle for this application context. |
org.osgi.framework.BundleContext |
getBundleContext()
Return the
BundleContext for this application context. |
void |
setBundleContext(org.osgi.framework.BundleContext bundleContext)
Sets the
BundleContext used by this OSGi bundle
application context. |
void |
setConfigLocations(String[] configLocations)
Sets the config locations for this OSGi bundle application context.
|
void |
setPublishContextAsService(boolean publishContextAsService)
Indicates whether this application context should be publish as an OSGi
service if successfully started.
|
addApplicationListener, addBeanFactoryPostProcessor, close, getBeanFactory, getEnvironment, isActive, refresh, registerShutdownHook, setEnvironment, setId, setParent
getApplicationName, getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDate
containsBeanDefinition, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotation
containsLocalBean, getParentBeanFactory
containsBean, getAliases, getBean, getBean, getBean, getBean, getType, isPrototype, isSingleton, isTypeMatch
getMessage, getMessage, getMessage
getResources
static final String APPLICATION_CONTEXT_SERVICE_PROPERTY_NAME
static final String SPRING_DM_APPLICATION_CONTEXT_SERVICE_PROPERTY_NAME
static final String BUNDLE_CONTEXT_BEAN_NAME
static final String BUNDLE_BEAN_NAME
void setConfigLocations(String[] configLocations)
configLocations
- array of configuration locationsvoid setBundleContext(org.osgi.framework.BundleContext bundleContext)
BundleContext
used by this OSGi bundle
application context. Normally it's the BundleContext
in
which the context runs.
Does not cause an initialization of the context: ConfigurableApplicationContext.refresh()
needs
to be called after the setting of all configuration properties.
bundleContext
- the BundleContext
used by this
application context.ConfigurableApplicationContext.refresh()
org.osgi.framework.BundleContext getBundleContext()
BundleContext
for this application context.
This method is offered as a helper since as of OSGi 4.1, the bundle
context can be discovered directly from the given bundle.BundleContext
in which this application
context runsgetBundle()
org.osgi.framework.Bundle getBundle()
Bundle
for this application context.Bundle
for this OSGi bundle application
context.void setPublishContextAsService(boolean publishContextAsService)
true
.publishContextAsService
- true if the application context should be
published as a service, false otherwiseCopyright © 2006–2016. All rights reserved.