|
|||||||||
| Home >> All >> org >> apache >> geronimo >> kernel >> [ basic overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.geronimo.kernel.basic
Class BasicKernel

java.lang.Objectorg.apache.geronimo.kernel.basic.BasicKernel
- All Implemented Interfaces:
- org.apache.geronimo.kernel.Kernel
- public class BasicKernel
- extends java.lang.Object
- implements org.apache.geronimo.kernel.Kernel
- extends java.lang.Object
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 the event of system failure. TODO: Describe the order of method invocation (e.g. if loadGbean may be before boot)
- Version:
- $Rev: 154947 $ $Date: 2005-02-22 20:10:45 -0800 (Tue, 22 Feb 2005) $
| Field Summary | |
private java.util.Date |
bootTime
The timestamp when the kernel was started |
private org.apache.geronimo.kernel.DependencyManager |
dependencyManager
This manager is used by the kernel to manage dependencies between gbeans |
private java.lang.String |
kernelName
Name of this kernel |
private BasicLifecycleMonitor |
lifecycleMonitor
Monitors the lifecycle of all gbeans. |
private org.apache.commons.logging.Log |
log
The log |
private static java.lang.Object[] |
NO_ARGS
|
private static java.lang.String[] |
NO_TYPES
Helper objects for invoke and getAttribute |
private org.apache.geronimo.kernel.proxy.ProxyManager |
proxyManager
This factory gbean proxies, and tracks all proxies in the system |
private org.apache.geronimo.kernel.lifecycle.LifecycleMonitor |
publicLifecycleMonitor
|
private BasicRegistry |
registry
The registry |
private boolean |
running
Is this kernel running? |
private java.util.LinkedList |
shutdownHooks
Listeners for when the kernel shutdown |
| Fields inherited from interface org.apache.geronimo.kernel.Kernel |
KERNEL |
| Constructor Summary | |
BasicKernel(java.lang.String kernelName)
Construct a Kernel with the specified name. |
|
| Method Summary | |
void |
boot()
Boot this Kernel, triggering the instantiation of the MBeanServer and DependencyManager, and the registration of ConfigurationStore |
private org.apache.geronimo.gbean.GBeanName |
createGBeanName(javax.management.ObjectName objectName)
|
java.lang.Object |
getAttribute(javax.management.ObjectName objectName,
java.lang.String attributeName)
Gets the value of an attribute on the specified gbean |
java.util.Date |
getBootTime()
Returns the time this kernel was last booted. |
java.lang.ClassLoader |
getClassLoaderFor(javax.management.ObjectName name)
Gets the ClassLoader used to register the specified GBean |
org.apache.geronimo.kernel.DependencyManager |
getDependencyManager()
Gets the dependency manager kernel service |
org.apache.geronimo.gbean.GBeanData |
getGBeanData(javax.management.ObjectName name)
Return the GBeanData for a GBean instance. |
org.apache.geronimo.gbean.GBeanInfo |
getGBeanInfo(javax.management.ObjectName name)
Return the GBeanInfo for a registered GBean instance. |
long |
getGBeanStartTime(javax.management.ObjectName name)
Gets the time the specified GBean was started |
int |
getGBeanState(javax.management.ObjectName name)
Gets the state of the specified GBean. |
java.lang.String |
getKernelName()
Get the name of this kernel |
org.apache.geronimo.kernel.lifecycle.LifecycleMonitor |
getLifecycleMonitor()
Deprecated. don't use this yet... it may change or go away |
org.apache.geronimo.kernel.proxy.ProxyManager |
getProxyManager()
Deprecated. don't use this yet... it may change or go away |
java.lang.Object |
invoke(javax.management.ObjectName objectName,
java.lang.String methodName)
Invokes a no-argument method on the specified GBean |
java.lang.Object |
invoke(javax.management.ObjectName objectName,
java.lang.String methodName,
java.lang.Object[] args,
java.lang.String[] types)
Invokes a method on the specified GBean with the specified arguments |
boolean |
isGBeanEnabled(javax.management.ObjectName name)
Is the specified GBean enabled? |
boolean |
isLoaded(javax.management.ObjectName name)
Is there a GBean registered with the kernel under the specified name? |
boolean |
isRunning()
Has the kernel been booted |
java.util.Set |
listGBeans(javax.management.ObjectName pattern)
Returns a Set of all GBeans matching the object name pattern |
java.util.Set |
listGBeans(java.util.Set patterns)
Returns a Set of all GBeans matching the set of object name pattern |
void |
loadGBean(org.apache.geronimo.gbean.GBeanData gbeanData,
java.lang.ClassLoader classLoader)
Load a specific GBean into this kernel. |
private void |
notifyShutdownHooks()
|
void |
registerShutdownHook(java.lang.Runnable hook)
Registers a runnable to execute when the kernel is shutdown |
void |
setAttribute(javax.management.ObjectName objectName,
java.lang.String attributeName,
java.lang.Object attributeValue)
Sets the value of an attribute on the specified gbean |
void |
setGBeanEnabled(javax.management.ObjectName name,
boolean enabled)
Sets the eneabled status of the specified GBean. |
void |
shutdown()
Shut down this kernel instance, unregistering the MBeans and releasing the MBeanServer. |
void |
startGBean(javax.management.ObjectName name)
Start a specific GBean. |
void |
startRecursiveGBean(javax.management.ObjectName name)
Start a specific GBean and its children. |
void |
stopGBean(javax.management.ObjectName name)
Stop a specific GBean. |
void |
unloadGBean(javax.management.ObjectName name)
Unload a specific GBean. |
void |
unregisterShutdownHook(java.lang.Runnable hook)
Unregisters a runnable from the list to execute when the kernel is shutdown |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
NO_TYPES
private static final java.lang.String[] NO_TYPES
- Helper objects for invoke and getAttribute
NO_ARGS
private static final java.lang.Object[] NO_ARGS
kernelName
private final java.lang.String kernelName
- Name of this kernel
log
private org.apache.commons.logging.Log log
- The log
running
private boolean running
- Is this kernel running?
bootTime
private java.util.Date bootTime
- The timestamp when the kernel was started
registry
private final BasicRegistry registry
- The registry
shutdownHooks
private java.util.LinkedList shutdownHooks
- Listeners for when the kernel shutdown
dependencyManager
private org.apache.geronimo.kernel.DependencyManager dependencyManager
- This manager is used by the kernel to manage dependencies between gbeans
lifecycleMonitor
private BasicLifecycleMonitor lifecycleMonitor
- Monitors the lifecycle of all gbeans.
publicLifecycleMonitor
private org.apache.geronimo.kernel.lifecycle.LifecycleMonitor publicLifecycleMonitor
proxyManager
private org.apache.geronimo.kernel.proxy.ProxyManager proxyManager
- This factory gbean proxies, and tracks all proxies in the system
| Constructor Detail |
BasicKernel
public BasicKernel(java.lang.String kernelName)
- Construct a Kernel with the specified name.
| Method Detail |
getKernelName
public java.lang.String getKernelName()
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Get the name of this kernel
- Specified by:
getKernelNamein interfaceorg.apache.geronimo.kernel.Kernel
getDependencyManager
public org.apache.geronimo.kernel.DependencyManager getDependencyManager()
- Deprecated. this will be removed as when we add generalized dependencies to gbeans... the only current user is Configuration
- Description copied from interface:
org.apache.geronimo.kernel.Kernel- Gets the dependency manager kernel service
- Specified by:
getDependencyManagerin interfaceorg.apache.geronimo.kernel.Kernel
- Description copied from interface:
getLifecycleMonitor
public org.apache.geronimo.kernel.lifecycle.LifecycleMonitor getLifecycleMonitor()
- Deprecated. don't use this yet... it may change or go away
- Gets the lifecycle monitor.
- Specified by:
getLifecycleMonitorin interfaceorg.apache.geronimo.kernel.Kernel
- Gets the lifecycle monitor.
getProxyManager
public org.apache.geronimo.kernel.proxy.ProxyManager getProxyManager()
- Deprecated. don't use this yet... it may change or go away
- Gets the proxy manager.
- Specified by:
getProxyManagerin interfaceorg.apache.geronimo.kernel.Kernel
- Gets the proxy manager.
getAttribute
public java.lang.Object getAttribute(javax.management.ObjectName objectName, java.lang.String attributeName) throws org.apache.geronimo.kernel.GBeanNotFoundException, org.apache.geronimo.kernel.NoSuchAttributeException, java.lang.Exception
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Gets the value of an attribute on the specified gbean
- Specified by:
getAttributein interfaceorg.apache.geronimo.kernel.Kernel
setAttribute
public void setAttribute(javax.management.ObjectName objectName, java.lang.String attributeName, java.lang.Object attributeValue) throws org.apache.geronimo.kernel.GBeanNotFoundException, org.apache.geronimo.kernel.NoSuchAttributeException, java.lang.Exception
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Sets the value of an attribute on the specified gbean
- Specified by:
setAttributein interfaceorg.apache.geronimo.kernel.Kernel
invoke
public java.lang.Object invoke(javax.management.ObjectName objectName, java.lang.String methodName) throws org.apache.geronimo.kernel.GBeanNotFoundException, org.apache.geronimo.kernel.NoSuchOperationException, org.apache.geronimo.kernel.InternalKernelException, java.lang.Exception
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Invokes a no-argument method on the specified GBean
- Specified by:
invokein interfaceorg.apache.geronimo.kernel.Kernel
invoke
public java.lang.Object invoke(javax.management.ObjectName objectName, java.lang.String methodName, java.lang.Object[] args, java.lang.String[] types) throws org.apache.geronimo.kernel.GBeanNotFoundException, org.apache.geronimo.kernel.NoSuchOperationException, org.apache.geronimo.kernel.InternalKernelException, java.lang.Exception
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Invokes a method on the specified GBean with the specified arguments
- Specified by:
invokein interfaceorg.apache.geronimo.kernel.Kernel
isLoaded
public boolean isLoaded(javax.management.ObjectName name)
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Is there a GBean registered with the kernel under the specified name?
- Specified by:
isLoadedin interfaceorg.apache.geronimo.kernel.Kernel
getGBeanInfo
public org.apache.geronimo.gbean.GBeanInfo getGBeanInfo(javax.management.ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Return the GBeanInfo for a registered GBean instance.
- Specified by:
getGBeanInfoin interfaceorg.apache.geronimo.kernel.Kernel
getGBeanData
public org.apache.geronimo.gbean.GBeanData getGBeanData(javax.management.ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException, org.apache.geronimo.kernel.InternalKernelException
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Return the GBeanData for a GBean instance.
- Specified by:
getGBeanDatain interfaceorg.apache.geronimo.kernel.Kernel
loadGBean
public void loadGBean(org.apache.geronimo.gbean.GBeanData gbeanData, java.lang.ClassLoader classLoader) throws org.apache.geronimo.kernel.GBeanAlreadyExistsException, org.apache.geronimo.kernel.InternalKernelException
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Load a specific GBean into this kernel.
This is intended for applications that are embedding the kernel.
- Specified by:
loadGBeanin interfaceorg.apache.geronimo.kernel.Kernel
startGBean
public void startGBean(javax.management.ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException, org.apache.geronimo.kernel.InternalKernelException, java.lang.IllegalStateException
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Start a specific GBean.
- Specified by:
startGBeanin interfaceorg.apache.geronimo.kernel.Kernel
startRecursiveGBean
public void startRecursiveGBean(javax.management.ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException, org.apache.geronimo.kernel.InternalKernelException, java.lang.IllegalStateException
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Start a specific GBean and its children.
- Specified by:
startRecursiveGBeanin interfaceorg.apache.geronimo.kernel.Kernel
stopGBean
public void stopGBean(javax.management.ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException, org.apache.geronimo.kernel.InternalKernelException, java.lang.IllegalStateException
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Stop a specific GBean.
- Specified by:
stopGBeanin interfaceorg.apache.geronimo.kernel.Kernel
unloadGBean
public void unloadGBean(javax.management.ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException, org.apache.geronimo.kernel.InternalKernelException, java.lang.IllegalStateException
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Unload a specific GBean.
This is intended for applications that are embedding the kernel.
- Specified by:
unloadGBeanin interfaceorg.apache.geronimo.kernel.Kernel
getGBeanState
public int getGBeanState(javax.management.ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Gets the state of the specified GBean.
- Specified by:
getGBeanStatein interfaceorg.apache.geronimo.kernel.Kernel
getGBeanStartTime
public long getGBeanStartTime(javax.management.ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Gets the time the specified GBean was started
- Specified by:
getGBeanStartTimein interfaceorg.apache.geronimo.kernel.Kernel
isGBeanEnabled
public boolean isGBeanEnabled(javax.management.ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Is the specified GBean enabled?
- Specified by:
isGBeanEnabledin interfaceorg.apache.geronimo.kernel.Kernel
setGBeanEnabled
public void setGBeanEnabled(javax.management.ObjectName name, boolean enabled) throws org.apache.geronimo.kernel.GBeanNotFoundException
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Sets the eneabled status of the specified GBean. A disabled gbean can not be started, and
will not be started via startRecursive.
- Specified by:
setGBeanEnabledin interfaceorg.apache.geronimo.kernel.Kernel
listGBeans
public java.util.Set listGBeans(javax.management.ObjectName pattern)
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Returns a Set of all GBeans matching the object name pattern
- Specified by:
listGBeansin interfaceorg.apache.geronimo.kernel.Kernel
listGBeans
public java.util.Set listGBeans(java.util.Set patterns)
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Returns a Set of all GBeans matching the set of object name pattern
- Specified by:
listGBeansin interfaceorg.apache.geronimo.kernel.Kernel
boot
public void boot()
throws java.lang.Exception
- Boot this Kernel, triggering the instantiation of the MBeanServer and DependencyManager,
and the registration of ConfigurationStore
- Specified by:
bootin interfaceorg.apache.geronimo.kernel.Kernel
getBootTime
public java.util.Date getBootTime()
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Returns the time this kernel was last booted.
- Specified by:
getBootTimein interfaceorg.apache.geronimo.kernel.Kernel
registerShutdownHook
public void registerShutdownHook(java.lang.Runnable hook)
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Registers a runnable to execute when the kernel is shutdown
- Specified by:
registerShutdownHookin interfaceorg.apache.geronimo.kernel.Kernel
unregisterShutdownHook
public void unregisterShutdownHook(java.lang.Runnable hook)
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Unregisters a runnable from the list to execute when the kernel is shutdown
- Specified by:
unregisterShutdownHookin interfaceorg.apache.geronimo.kernel.Kernel
shutdown
public void shutdown()
- Shut down this kernel instance, unregistering the MBeans and releasing
the MBeanServer.
- Specified by:
shutdownin interfaceorg.apache.geronimo.kernel.Kernel
notifyShutdownHooks
private void notifyShutdownHooks()
isRunning
public boolean isRunning()
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Has the kernel been booted
- Specified by:
isRunningin interfaceorg.apache.geronimo.kernel.Kernel
getClassLoaderFor
public java.lang.ClassLoader getClassLoaderFor(javax.management.ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException
- Description copied from interface:
org.apache.geronimo.kernel.Kernel - Gets the ClassLoader used to register the specified GBean
- Specified by:
getClassLoaderForin interfaceorg.apache.geronimo.kernel.Kernel
createGBeanName
private org.apache.geronimo.gbean.GBeanName createGBeanName(javax.management.ObjectName objectName)
|
|||||||||
| Home >> All >> org >> apache >> geronimo >> kernel >> [ basic overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.geronimo.kernel.basic.BasicKernel