|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.apache.geronimo.kernel.Kernel
The core of a Geronimo instance. A Kernel is responsible for managing the Configurations that comprise a Geronimo system and exposing them using JMX. Each Kernel is associated with an MBeanServer that is used to register the Configurations themselves and the MBeans they define.
Dependencies between MBeans are handled by a dedicated DependencyManager that is responsible for tracking those dependencies and ensuring that the dependent objects follow the appropriate lifecycle and receive appropriate notifications. The Kernel also provides a ConfigurationStore which is used to stage installed Configurations (providing a local filesystem based classpath) and used hold the persistent state of each Configuration. This allows Configurations to restart in he event of system failure.
Field Summary | |
static javax.management.ObjectName |
KERNEL
The JMX name used by a Kernel to register itself when it boots. |
Constructor Summary | |
Kernel()
No-arg constructor allowing this class to be used as a GBean reference. |
|
Kernel(String domainName)
Construct a Kernel which does not have a config store. |
|
Kernel(String kernelName,
String domainName)
Construct a Kernel which does not have a config store. |
Method Summary | |
void |
boot()
Boot this Kernel, triggering the instantiation of the MBeanServer and DependencyManager, and the registration ConfigurationStore |
Object |
getAttribute(javax.management.ObjectName objectName,
String attributeName)
|
ConfigurationManager |
getConfigurationManager()
|
int |
getConfigurationState(URI configID)
|
DependencyManager |
getDependencyManager()
|
static Kernel |
getKernel(String name)
Get a particular kernel indexed by a name |
String |
getKernelName()
Get the name of this kernel |
javax.management.MBeanServer |
getMBeanServer()
Get the MBeanServer used by this kernel |
static Kernel |
getSingleKernel()
Obtain the single kernel that's registered. |
Object |
invoke(javax.management.ObjectName objectName,
String methodName)
|
Object |
invoke(javax.management.ObjectName objectName,
String methodName,
Object[] args,
String[] types)
|
boolean |
isLoaded(javax.management.ObjectName name)
|
boolean |
isRunning()
|
List |
listConfigurations(javax.management.ObjectName storeName)
Return info about the configurations in a store. |
List |
listConfigurationStores()
Return a list of the stores this kernel knows about. |
Set |
listGBeans(javax.management.ObjectName query)
Return the names of GBeans that match the query. |
void |
loadGBean(javax.management.ObjectName name,
org.apache.geronimo.gbean.jmx.GBeanMBean gbean)
Load a specific GBean into this kernel. |
void |
registerShutdownHook(Runnable hook)
|
void |
setAttribute(javax.management.ObjectName objectName,
String attributeName,
Object attributeValue)
|
void |
shutdown()
Shut down this kernel instance, unregistering the MBeans and releasing the MBeanServer. |
javax.management.ObjectName |
startConfiguration(URI configID)
|
void |
startGBean(javax.management.ObjectName name)
Start a specific GBean. |
void |
startRecursiveGBean(javax.management.ObjectName name)
Start a specific GBean and its children. |
void |
stopConfiguration(URI configID)
|
void |
stopGBean(javax.management.ObjectName name)
Stop a specific GBean. |
void |
unloadGBean(javax.management.ObjectName name)
Unload a specific GBean. |
void |
unregisterShutdownHook(Runnable hook)
|
Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final javax.management.ObjectName KERNEL
Constructor Detail |
public Kernel()
public Kernel(String domainName)
domainName
- the domain name to be used for the JMX MBeanServerpublic Kernel(String kernelName, String domainName)
kernelName
- the name of the kernel that uniquely indentifies the kernel in a VMdomainName
- the domain name to be used for the JMX MBeanServerMethod Detail |
public javax.management.MBeanServer getMBeanServer()
KernelMBean
getMBeanServer
in interface KernelMBean
public String getKernelName()
KernelMBean
getKernelName
in interface KernelMBean
public static Kernel getKernel(String name)
name
- the name of the kernel to be obtained
public static Kernel getSingleKernel()
This method assumes that there is only one kernel registered and will throw an
IllegalStateException
if more than one has been registered.
IllegalStateException
- if more than onepublic DependencyManager getDependencyManager()
public ConfigurationManager getConfigurationManager()
getConfigurationManager
in interface KernelMBean
public Object getAttribute(javax.management.ObjectName objectName, String attributeName) throws Exception
getAttribute
in interface KernelMBean
Exception
public void setAttribute(javax.management.ObjectName objectName, String attributeName, Object attributeValue) throws Exception
setAttribute
in interface KernelMBean
Exception
public Object invoke(javax.management.ObjectName objectName, String methodName) throws Exception
invoke
in interface KernelMBean
Exception
public Object invoke(javax.management.ObjectName objectName, String methodName, Object[] args, String[] types) throws Exception
invoke
in interface KernelMBean
Exception
public boolean isLoaded(javax.management.ObjectName name)
isLoaded
in interface KernelMBean
public void loadGBean(javax.management.ObjectName name, org.apache.geronimo.gbean.jmx.GBeanMBean gbean) throws javax.management.InstanceAlreadyExistsException, InvalidConfigException
KernelMBean
loadGBean
in interface KernelMBean
name
- the name to register the GBean undergbean
- the GBean to register
InvalidConfigException
- if there is a problem during registration
javax.management.InstanceAlreadyExistsException
- if the name is already usedpublic void startGBean(javax.management.ObjectName name) throws javax.management.InstanceNotFoundException, InvalidConfigException
KernelMBean
startGBean
in interface KernelMBean
name
- the GBean to start
javax.management.InstanceNotFoundException
- if the GBean could not be found
InvalidConfigException
public void startRecursiveGBean(javax.management.ObjectName name) throws javax.management.InstanceNotFoundException, InvalidConfigException
KernelMBean
startRecursiveGBean
in interface KernelMBean
name
- the GBean to start
javax.management.InstanceNotFoundException
- if the GBean could not be found
InvalidConfigException
public void stopGBean(javax.management.ObjectName name) throws javax.management.InstanceNotFoundException, InvalidConfigException
KernelMBean
stopGBean
in interface KernelMBean
name
- the GBean to stop
javax.management.InstanceNotFoundException
- if the GBean could not be found
InvalidConfigException
public void unloadGBean(javax.management.ObjectName name) throws javax.management.InstanceNotFoundException
KernelMBean
unloadGBean
in interface KernelMBean
name
- the name of the GBean to unregister
javax.management.InstanceNotFoundException
- if the GBean could not be foundpublic Set listGBeans(javax.management.ObjectName query)
KernelMBean
listGBeans
in interface KernelMBean
query
- the query to be performed
public List listConfigurationStores()
KernelMBean
listConfigurationStores
in interface KernelMBean
public List listConfigurations(javax.management.ObjectName storeName) throws NoSuchStoreException
KernelMBean
listConfigurations
in interface KernelMBean
storeName
- the store
NoSuchStoreException
- if this store does not existpublic javax.management.ObjectName startConfiguration(URI configID) throws NoSuchConfigException, IOException, InvalidConfigException
startConfiguration
in interface KernelMBean
NoSuchConfigException
IOException
InvalidConfigException
public void stopConfiguration(URI configID) throws NoSuchConfigException
stopConfiguration
in interface KernelMBean
NoSuchConfigException
public int getConfigurationState(URI configID) throws NoSuchConfigException
getConfigurationState
in interface KernelMBean
NoSuchConfigException
public void boot() throws Exception
Exception
- if the boot failspublic void registerShutdownHook(Runnable hook)
registerShutdownHook
in interface KernelMBean
public void unregisterShutdownHook(Runnable hook)
unregisterShutdownHook
in interface KernelMBean
public void shutdown()
shutdown
in interface KernelMBean
public boolean isRunning()
isRunning
in interface KernelMBean
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |