public abstract class AbstractNettyThreadgroupModuleFactory extends Object implements ModuleFactory
Constructor and Description |
---|
AbstractNettyThreadgroupModuleFactory() |
Modifier and Type | Method and Description |
---|---|
Module |
createModule(String instanceName,
DependencyResolver dependencyResolver,
org.osgi.framework.BundleContext bundleContext)
Create a new Module instance.
|
Module |
createModule(String instanceName,
DependencyResolver dependencyResolver,
DynamicMBeanWithInstance old,
org.osgi.framework.BundleContext bundleContext)
Create a new Module instance.
|
Set<NettyThreadgroupModule> |
getDefaultModules(DependencyResolverFactory dependencyResolverFactory,
org.osgi.framework.BundleContext bundleContext)
Called when ModuleFactory is registered to config manager.
|
String |
getImplementationName()
Returns the human-friendly implementation name.
|
Set<Class<? extends AbstractServiceInterface>> |
getImplementedServiceIntefaces() |
NettyThreadgroupModule |
handleChangedClass(DependencyResolver dependencyResolver,
DynamicMBeanWithInstance old,
org.osgi.framework.BundleContext bundleContext) |
NettyThreadgroupModule |
handleChangedClass(DynamicMBeanWithInstance old)
Deprecated.
|
NettyThreadgroupModule |
instantiateModule(String instanceName,
DependencyResolver dependencyResolver,
org.osgi.framework.BundleContext bundleContext) |
NettyThreadgroupModule |
instantiateModule(String instanceName,
DependencyResolver dependencyResolver,
NettyThreadgroupModule oldModule,
AutoCloseable oldInstance,
org.osgi.framework.BundleContext bundleContext) |
boolean |
isModuleImplementingServiceInterface(Class<? extends AbstractServiceInterface> serviceInterface) |
public static final String NAME
public AbstractNettyThreadgroupModuleFactory()
public final String getImplementationName()
ModuleFactory
getImplementationName
in interface ModuleFactory
public final boolean isModuleImplementingServiceInterface(Class<? extends AbstractServiceInterface> serviceInterface)
isModuleImplementingServiceInterface
in interface ModuleFactory
public Set<Class<? extends AbstractServiceInterface>> getImplementedServiceIntefaces()
getImplementedServiceIntefaces
in interface ModuleFactory
public Module createModule(String instanceName, DependencyResolver dependencyResolver, org.osgi.framework.BundleContext bundleContext)
ModuleFactory
createModule
in interface ModuleFactory
dependencyResolver
- This resolver will return actual config mbean based on its
ObjectName.bundleContext
- Reference to OSGi bundleContext that can be used to acquire OSGi
services, startup configuration and other OSGi related
information.public Module createModule(String instanceName, DependencyResolver dependencyResolver, DynamicMBeanWithInstance old, org.osgi.framework.BundleContext bundleContext) throws Exception
ModuleFactory
DynamicMBean
.
Implementations should use the MBeanInfo interface to understand the
structure of the configuration information.
Structural information impacts hot-swap operations in that in order to perform such a swap the newly loaded code needs to understand the previously-running instance configuration layout and how to map it onto itself.
createModule
in interface ModuleFactory
dependencyResolver
- This resolver will return actual config mbean based on its
ObjectName.old
- existing module from platform MBeanServer that is being
reconfigured. Implementations should inspect its attributes using
DynamicMBean.getAttribute(String)
and set
those attributes on newly created module. If reconfiguration of
live instances is supported, this live instance can be retreived
using
DynamicMBeanWithInstance.getInstance()
. It is possible that casting this old instance throws
ClassCastException
when OSGi bundle is being updated. In
this case, implementation should revert to creating new instance.bundleContext
- Reference to OSGi bundleContext that can be used to acquire OSGi
services, startup configuration and other OSGi related
information.Exception
- if it is not possible to recover configuration from old. This
leaves server in a running state but no configuration transaction
can be created.public NettyThreadgroupModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, NettyThreadgroupModule oldModule, AutoCloseable oldInstance, org.osgi.framework.BundleContext bundleContext)
public NettyThreadgroupModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, org.osgi.framework.BundleContext bundleContext)
public NettyThreadgroupModule handleChangedClass(DependencyResolver dependencyResolver, DynamicMBeanWithInstance old, org.osgi.framework.BundleContext bundleContext) throws Exception
Exception
@Deprecated public NettyThreadgroupModule handleChangedClass(DynamicMBeanWithInstance old) throws Exception
Exception
public Set<NettyThreadgroupModule> getDefaultModules(DependencyResolverFactory dependencyResolverFactory, org.osgi.framework.BundleContext bundleContext)
ModuleFactory
getDefaultModules
in interface ModuleFactory
dependencyResolverFactory
- factory for getting dependency resolvers for each module.bundleContext
- Reference to OSGi bundleContext that can be used to acquire OSGi
services, startup configuration and other OSGi related
information.Copyright © 2019 OpenDaylight. All rights reserved.