org.springframework.osgi.context.support
Class BundleFactoryBean
java.lang.Object
org.springframework.osgi.context.support.BundleFactoryBean
- All Implemented Interfaces:
- DisposableBean, FactoryBean, InitializingBean, BundleContextAware
- Direct Known Subclasses:
- VirtualBundleFactoryBean
public class BundleFactoryBean
- extends Object
- implements FactoryBean, BundleContextAware, InitializingBean, DisposableBean
Install Bundles using a FactoryBean.
This allows customers to use Spring to drive bundle management. Bundles
states can be modified using the state parameter. Most commonly this is set
to "start".
Pay attention when installing bundles dynamically since classes can be
loaded aggressively.
- Author:
- Andy Piper
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
location
protected Resource location
- Bundle location
symbolicName
protected String symbolicName
- Bundle symName
bundleContext
protected BundleContext bundleContext
BundleFactoryBean
public BundleFactoryBean()
getObjectType
public Class getObjectType()
- Specified by:
getObjectType
in interface FactoryBean
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interface FactoryBean
getObject
public Object getObject()
throws Exception
- Specified by:
getObject
in interface FactoryBean
- Throws:
Exception
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Throws:
Exception
destroy
public void destroy()
throws Exception
- Specified by:
destroy
in interface DisposableBean
- Throws:
Exception
setLocation
public void setLocation(Resource url)
throws Exception
- Throws:
Exception
setSymbolicName
public void setSymbolicName(String symbolicName)
setBundleContext
public void setBundleContext(BundleContext context)
- Specified by:
setBundleContext
in interface BundleContextAware
setAction
public void setAction(String action)
setStartLevel
public void setStartLevel(int startLevel)
setPushBundleAsContextClassloader
public void setPushBundleAsContextClassloader(boolean pushBundleAsContextClassLoader)
- Determines whether invocations on the remote service should be performed
in the context of the target bundle's ClassLoader. The default is false.
- Parameters:
pushBundleAsContextClassLoader
-
setClassloader
public void setClassloader(ClassLoader classloader)
Copyright © 2006-2007 Spring Framework. All Rights Reserved.