|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.xbean.kernel.KernelFactory
The Kernel factory is used to construct and locate Kernels. This class is loosly based on the SAXParserFactory and the JMX MBeanServerFactory. To constuct a kernel use the following:
Kernel kernel = KernelFactory.newInstance().createKernel(name);
| Field Summary | |
static java.lang.String |
KERNEL_FACTORY_KEY
The name of the system property and META-INF/services used to locate the kernel factory class. |
| Constructor Summary | |
KernelFactory()
|
|
| Method Summary | |
Kernel |
createKernel(java.lang.String name)
Creates a new kernel instance and registers it with the static KernelFactory registry. |
protected abstract Kernel |
createKernelInternal(java.lang.String name)
Creates the actual kernel instance which will be registerd in the KernelFactory. |
static void |
destroyInstance(Kernel kernel)
Removes the kernel instance from the internal kernel registry. |
static Kernel |
getKernel(java.lang.String name)
Gets the kernel registered under the specified name. |
static java.util.Map |
getKernels()
Gets a map of the existing kernels by kernel name. |
static KernelFactory |
newInstance()
Creates a kernel with the specified name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String KERNEL_FACTORY_KEY
| Constructor Detail |
public KernelFactory()
| Method Detail |
public static Kernel getKernel(java.lang.String name)
name - the name of the kernel to return
public static java.util.Map getKernels()
public static KernelFactory newInstance()
throws KernelFactoryError
KernelFactoryError - if the specified kernel factory can not be created
public static void destroyInstance(Kernel kernel)
throws KernelFactoryError
kernel - the kernel to destroy
KernelFactoryError - if the kernel is still running
public final Kernel createKernel(java.lang.String name)
throws KernelAlreadyExistsException
getKernel(String) method.
name - the name of the kernel to create
KernelAlreadyExistsException - is a kernel already exists with the specified nameprotected abstract Kernel createKernelInternal(java.lang.String name)
name - the kernel name
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||