Package com.github.fungal.api
Interface Kernel
- All Known Implementing Classes:
KernelImpl
public interface Kernel
The kernel API
- Author:
- Jesper Pedersen
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> TGet a beanGet the deploymentsgetDeployments(URL deployment) Get the deployment units for a deploymentGet the kernel class loaderGet the MainDeployer for the kernelGet the MBeanServer for the kernelgetName()Get the name of the kernelGet the version of the kernelInstall beansvoidshutdown()Shutdownvoidstartup()Startupvoiduninstall(BeanDeployment beans) Uninstall beans
-
Method Details
-
getName
String getName()Get the name of the kernel- Returns:
- The value
-
getVersion
String getVersion()Get the version of the kernel- Returns:
- The value
-
getMBeanServer
MBeanServer getMBeanServer()Get the MBeanServer for the kernel- Returns:
- The MBeanServer instance
-
getMainDeployer
MainDeployer getMainDeployer()Get the MainDeployer for the kernel- Returns:
- The MainDeployer instance
-
getKernelClassLoader
KernelClassLoader getKernelClassLoader()Get the kernel class loader- Returns:
- The class loader
-
getDeployments
Collection<Deployment> getDeployments()Get the deployments- Returns:
- The deployment units;
nullif no units is found
-
getDeployments
Get the deployment units for a deployment- Parameters:
deployment- The unique URL for a deployment- Returns:
- The deployment units;
nullif no units is found
-
getBean
Get a bean- Parameters:
name- The bean nameexpectedType- The expected type for the bean- Returns:
- The bean instance
- Throws:
Throwable- If an error occurs
-
install
Install beans- Parameters:
beans- The beans- Returns:
- The deployment that represents the beans
- Throws:
Throwable- If an error occurs
-
uninstall
Uninstall beans- Parameters:
beans- The bean deployment- Throws:
Throwable- If an error occurs
-
startup
Startup- Throws:
Throwable- Thrown if an error occurs
-
shutdown
Shutdown- Throws:
Throwable- Thrown if an error occurs
-