org.eclipse.gemini.blueprint.context
Interface ConfigurableOsgiBundleApplicationContext
- All Superinterfaces:
- org.springframework.context.ApplicationContext, org.springframework.context.ApplicationEventPublisher, org.springframework.beans.factory.BeanFactory, org.springframework.context.ConfigurableApplicationContext, org.springframework.core.env.EnvironmentCapable, org.springframework.beans.factory.HierarchicalBeanFactory, org.springframework.context.Lifecycle, org.springframework.beans.factory.ListableBeanFactory, org.springframework.context.MessageSource, org.springframework.core.io.ResourceLoader, org.springframework.core.io.support.ResourcePatternResolver
- All Known Subinterfaces:
- DelegatedExecutionOsgiBundleApplicationContext
- All Known Implementing Classes:
- AbstractDelegatedExecutionApplicationContext, AbstractOsgiBundleApplicationContext, OsgiBundleXmlApplicationContext
public interface ConfigurableOsgiBundleApplicationContext
- extends org.springframework.context.ConfigurableApplicationContext
Interface that extends ConfigurableApplicationContext to
provides OSGi specific functionality.
Note: Just like its ancestors,the setters of this interface
should be called before refreshing the
ApplicationContext
- Author:
- Costin Leau
| Fields inherited from interface org.springframework.context.ConfigurableApplicationContext |
CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, ENVIRONMENT_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAME |
| Fields inherited from interface org.springframework.beans.factory.BeanFactory |
FACTORY_BEAN_PREFIX |
| Fields inherited from interface org.springframework.beans.factory.BeanFactory |
FACTORY_BEAN_PREFIX |
| Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
CLASSPATH_ALL_URL_PREFIX |
| Fields inherited from interface org.springframework.core.io.ResourceLoader |
CLASSPATH_URL_PREFIX |
|
Method Summary |
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. |
| Methods inherited from interface org.springframework.context.ConfigurableApplicationContext |
addApplicationListener, addBeanFactoryPostProcessor, close, getBeanFactory, getEnvironment, isActive, refresh, registerShutdownHook, setEnvironment, setId, setParent |
| Methods inherited from interface org.springframework.context.ApplicationContext |
getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDate |
| Methods inherited from interface org.springframework.beans.factory.ListableBeanFactory |
containsBeanDefinition, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotation |
| Methods inherited from interface org.springframework.beans.factory.BeanFactory |
containsBean, getAliases, getBean, getBean, getBean, getBean, getType, isPrototype, isSingleton, isTypeMatch |
| Methods inherited from interface org.springframework.beans.factory.HierarchicalBeanFactory |
containsLocalBean, getParentBeanFactory |
| Methods inherited from interface org.springframework.beans.factory.BeanFactory |
containsBean, getAliases, getBean, getBean, getBean, getBean, getType, isPrototype, isSingleton, isTypeMatch |
| Methods inherited from interface org.springframework.context.MessageSource |
getMessage, getMessage, getMessage |
| Methods inherited from interface org.springframework.context.ApplicationEventPublisher |
publishEvent |
| Methods inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
getResources |
| Methods inherited from interface org.springframework.core.io.ResourceLoader |
getClassLoader, getResource |
| Methods inherited from interface org.springframework.context.Lifecycle |
isRunning, start, stop |
APPLICATION_CONTEXT_SERVICE_PROPERTY_NAME
static final String APPLICATION_CONTEXT_SERVICE_PROPERTY_NAME
- Service entry used for specifying the application context name when
published as an OSGi service
- See Also:
- Constant Field Values
SPRING_DM_APPLICATION_CONTEXT_SERVICE_PROPERTY_NAME
static final 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
- See Also:
- Constant Field Values
BUNDLE_CONTEXT_BEAN_NAME
static final String BUNDLE_CONTEXT_BEAN_NAME
- Name of the bundle context bean
- See Also:
- Constant Field Values
BUNDLE_BEAN_NAME
static final String BUNDLE_BEAN_NAME
- Name of the bundle bean
- See Also:
- Constant Field Values
setConfigLocations
void setConfigLocations(String[] configLocations)
- Sets the config locations for this OSGi bundle application context. If
not set, the implementation is supposed to use a default for the given
bundle.
- Parameters:
configLocations - array of configuration locations
setBundleContext
void setBundleContext(org.osgi.framework.BundleContext bundleContext)
- Sets the
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.
- Parameters:
bundleContext - the BundleContext used by this
application context.- See Also:
ConfigurableApplicationContext.refresh()
getBundleContext
org.osgi.framework.BundleContext getBundleContext()
- Return the
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.
- Returns:
- the
BundleContext in which this application
context runs - See Also:
getBundle()
getBundle
org.osgi.framework.Bundle getBundle()
- Returns the OSGi
Bundle for this application context.
- Returns:
- the
Bundle for this OSGi bundle application
context.
setPublishContextAsService
void setPublishContextAsService(boolean publishContextAsService)
- Indicates whether this application context should be publish as an OSGi
service if successfully started. By default, this is set to
true.
- Parameters:
publishContextAsService - true if the application context should be
published as a service, false otherwise
Copyright © 2006-2012. All Rights Reserved.