org.apache.geronimo.system.jmx
Class KernelDelegate

java.lang.Object
  extended by org.apache.geronimo.system.jmx.KernelDelegate
All Implemented Interfaces:
Kernel

public class KernelDelegate
extends Object
implements Kernel


Field Summary
 
Fields inherited from interface org.apache.geronimo.kernel.Kernel
KERNEL, KERNEL_NAME
 
Constructor Summary
KernelDelegate(MBeanServerConnection mbeanServer)
           
 
Method Summary
 void boot()
          Throws UnsupportedOperationException.
 AbstractName getAbstractNameFor(Object service)
           
 Object getAttribute(AbstractName abstractName, String attributeName)
           
 Object getAttribute(Class type, String attributeName)
           
 Object getAttribute(ObjectName objectName, String attributeName)
           
 Object getAttribute(String shortName, Class type, String attributeName)
           
 Object getAttribute(String shortName, String attributeName)
           
 Date getBootTime()
           
 ClassLoader getClassLoaderFor(AbstractName name)
           
 ClassLoader getClassLoaderFor(Class type)
           
 ClassLoader getClassLoaderFor(String shortName)
           
 ClassLoader getClassLoaderFor(String shortName, Class type)
           
 DependencyManager getDependencyManager()
          Throws UnsupportedOperationException.
 Object getGBean(AbstractName name)
           
 Object getGBean(Class type)
           
 Object getGBean(ObjectName name)
           
 Object getGBean(String shortName)
           
 Object getGBean(String shortName, Class type)
           
 GBeanData getGBeanData(AbstractName name)
           
 GBeanData getGBeanData(Class type)
           
 GBeanData getGBeanData(String shortName)
           
 GBeanData getGBeanData(String shortName, Class type)
           
 GBeanInfo getGBeanInfo(AbstractName name)
           
 GBeanInfo getGBeanInfo(Class type)
           
 GBeanInfo getGBeanInfo(ObjectName name)
           
 GBeanInfo getGBeanInfo(String shortName)
           
 GBeanInfo getGBeanInfo(String shortName, Class type)
           
 long getGBeanStartTime(AbstractName name)
           
 long getGBeanStartTime(Class type)
           
 long getGBeanStartTime(String shortName)
           
 long getGBeanStartTime(String shortName, Class type)
           
 int getGBeanState(AbstractName name)
           
 int getGBeanState(Class type)
           
 int getGBeanState(ObjectName name)
           
 int getGBeanState(String shortName)
           
 int getGBeanState(String shortName, Class type)
           
 String getKernelName()
           
 LifecycleMonitor getLifecycleMonitor()
          Throws UnsupportedOperationException.
 Naming getNaming()
           
 ProxyManager getProxyManager()
           
 String getShortNameFor(Object service)
           
 String getStateReason(AbstractName abstractName)
           
 Object invoke(AbstractName abstractName, String methodName)
           
 Object invoke(AbstractName abstractName, String methodName, Object[] args, String[] types)
           
 Object invoke(Class type, String methodName)
           
 Object invoke(Class type, String methodName, Object[] args, String[] types)
           
 Object invoke(ObjectName objectName, String methodName)
           
 Object invoke(ObjectName objectName, String methodName, Object[] args, String[] types)
           
 Object invoke(String shortName, Class type, String methodName)
           
 Object invoke(String shortName, Class type, String methodName, Object[] args, String[] types)
           
 Object invoke(String shortName, String methodName)
           
 Object invoke(String shortName, String methodName, Object[] args, String[] types)
           
 boolean isLoaded(AbstractName name)
           
 boolean isLoaded(Class type)
           
 boolean isLoaded(String shortName)
           
 boolean isLoaded(String shortName, Class type)
           
 boolean isRunning()
           
 boolean isRunning(AbstractName name)
           
 boolean isRunning(Class type)
           
 boolean isRunning(String shortName)
           
 boolean isRunning(String shortName, Class type)
           
 Set listGBeans(AbstractNameQuery query)
           
 Set listGBeans(ObjectName pattern)
           
 Set listGBeans(Set patterns)
           
 void loadGBean(GBeanData gbeanData, ClassLoader classLoader)
           
 void registerShutdownHook(Runnable hook)
           
 void setAttribute(AbstractName abstractName, String attributeName, Object attributeValue)
           
 void setAttribute(Class type, String attributeName, Object attributeValue)
           
 void setAttribute(String shortName, Class type, String attributeName, Object attributeValue)
           
 void setAttribute(String shortName, String attributeName, Object attributeValue)
           
 void shutdown()
           
 void startGBean(AbstractName name)
           
 void startGBean(Class type)
           
 void startGBean(String shortName)
           
 void startGBean(String shortName, Class type)
           
 void startRecursiveGBean(AbstractName name)
           
 void startRecursiveGBean(Class type)
           
 void startRecursiveGBean(String shortName)
           
 void startRecursiveGBean(String shortName, Class type)
           
 void stopGBean(AbstractName name)
           
 void stopGBean(Class type)
           
 void stopGBean(String shortName)
           
 void stopGBean(String shortName, Class type)
           
 void unloadGBean(AbstractName name)
           
 void unloadGBean(Class type)
           
 void unloadGBean(String shortName)
           
 void unloadGBean(String shortName, Class type)
           
 void unregisterShutdownHook(Runnable hook)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KernelDelegate

public KernelDelegate(MBeanServerConnection mbeanServer)
Method Detail

getBootTime

public Date getBootTime()
Specified by:
getBootTime in interface Kernel

getKernelName

public String getKernelName()
Specified by:
getKernelName in interface Kernel

getNaming

public Naming getNaming()
Specified by:
getNaming in interface Kernel

getGBean

public Object getGBean(ObjectName name)
                throws GBeanNotFoundException,
                       InternalKernelException,
                       IllegalStateException
Specified by:
getGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

getGBean

public Object getGBean(AbstractName name)
                throws GBeanNotFoundException,
                       InternalKernelException,
                       IllegalStateException
Specified by:
getGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

getGBean

public Object getGBean(String shortName)
                throws GBeanNotFoundException,
                       InternalKernelException,
                       IllegalStateException
Specified by:
getGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

getGBean

public Object getGBean(Class type)
                throws GBeanNotFoundException,
                       InternalKernelException,
                       IllegalStateException
Specified by:
getGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

getGBean

public Object getGBean(String shortName,
                       Class type)
                throws GBeanNotFoundException,
                       InternalKernelException,
                       IllegalStateException
Specified by:
getGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

loadGBean

public void loadGBean(GBeanData gbeanData,
                      ClassLoader classLoader)
               throws GBeanAlreadyExistsException
Specified by:
loadGBean in interface Kernel
Throws:
GBeanAlreadyExistsException

startGBean

public void startGBean(AbstractName name)
                throws GBeanNotFoundException,
                       InternalKernelException,
                       IllegalStateException
Specified by:
startGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

startGBean

public void startGBean(String shortName)
                throws GBeanNotFoundException,
                       InternalKernelException,
                       IllegalStateException
Specified by:
startGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

startGBean

public void startGBean(Class type)
                throws GBeanNotFoundException,
                       InternalKernelException,
                       IllegalStateException
Specified by:
startGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

startGBean

public void startGBean(String shortName,
                       Class type)
                throws GBeanNotFoundException,
                       InternalKernelException,
                       IllegalStateException
Specified by:
startGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

startRecursiveGBean

public void startRecursiveGBean(AbstractName name)
                         throws GBeanNotFoundException,
                                InternalKernelException,
                                IllegalStateException
Specified by:
startRecursiveGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

startRecursiveGBean

public void startRecursiveGBean(String shortName)
                         throws GBeanNotFoundException,
                                InternalKernelException,
                                IllegalStateException
Specified by:
startRecursiveGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

startRecursiveGBean

public void startRecursiveGBean(Class type)
                         throws GBeanNotFoundException,
                                InternalKernelException,
                                IllegalStateException
Specified by:
startRecursiveGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

startRecursiveGBean

public void startRecursiveGBean(String shortName,
                                Class type)
                         throws GBeanNotFoundException,
                                InternalKernelException,
                                IllegalStateException
Specified by:
startRecursiveGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

isRunning

public boolean isRunning(AbstractName name)
Specified by:
isRunning in interface Kernel

isRunning

public boolean isRunning(String shortName)
Specified by:
isRunning in interface Kernel

isRunning

public boolean isRunning(Class type)
Specified by:
isRunning in interface Kernel

isRunning

public boolean isRunning(String shortName,
                         Class type)
Specified by:
isRunning in interface Kernel

stopGBean

public void stopGBean(AbstractName name)
               throws GBeanNotFoundException,
                      InternalKernelException,
                      IllegalStateException
Specified by:
stopGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

stopGBean

public void stopGBean(String shortName)
               throws GBeanNotFoundException,
                      InternalKernelException,
                      IllegalStateException
Specified by:
stopGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

stopGBean

public void stopGBean(Class type)
               throws GBeanNotFoundException,
                      InternalKernelException,
                      IllegalStateException
Specified by:
stopGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

stopGBean

public void stopGBean(String shortName,
                      Class type)
               throws GBeanNotFoundException,
                      InternalKernelException,
                      IllegalStateException
Specified by:
stopGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

unloadGBean

public void unloadGBean(AbstractName name)
                 throws GBeanNotFoundException,
                        InternalKernelException,
                        IllegalStateException
Specified by:
unloadGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

unloadGBean

public void unloadGBean(String shortName)
                 throws GBeanNotFoundException,
                        InternalKernelException,
                        IllegalStateException
Specified by:
unloadGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

unloadGBean

public void unloadGBean(Class type)
                 throws GBeanNotFoundException,
                        InternalKernelException,
                        IllegalStateException
Specified by:
unloadGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

unloadGBean

public void unloadGBean(String shortName,
                        Class type)
                 throws GBeanNotFoundException,
                        InternalKernelException,
                        IllegalStateException
Specified by:
unloadGBean in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException
IllegalStateException

getGBeanState

public int getGBeanState(ObjectName name)
                  throws GBeanNotFoundException
Specified by:
getGBeanState in interface Kernel
Throws:
GBeanNotFoundException

getGBeanState

public int getGBeanState(AbstractName name)
                  throws GBeanNotFoundException
Specified by:
getGBeanState in interface Kernel
Throws:
GBeanNotFoundException

getGBeanState

public int getGBeanState(String shortName)
                  throws GBeanNotFoundException
Specified by:
getGBeanState in interface Kernel
Throws:
GBeanNotFoundException

getGBeanState

public int getGBeanState(Class type)
                  throws GBeanNotFoundException
Specified by:
getGBeanState in interface Kernel
Throws:
GBeanNotFoundException

getGBeanState

public int getGBeanState(String shortName,
                         Class type)
                  throws GBeanNotFoundException
Specified by:
getGBeanState in interface Kernel
Throws:
GBeanNotFoundException

getGBeanStartTime

public long getGBeanStartTime(AbstractName name)
                       throws GBeanNotFoundException
Specified by:
getGBeanStartTime in interface Kernel
Throws:
GBeanNotFoundException

getGBeanStartTime

public long getGBeanStartTime(String shortName)
                       throws GBeanNotFoundException
Specified by:
getGBeanStartTime in interface Kernel
Throws:
GBeanNotFoundException

getGBeanStartTime

public long getGBeanStartTime(Class type)
                       throws GBeanNotFoundException
Specified by:
getGBeanStartTime in interface Kernel
Throws:
GBeanNotFoundException

getGBeanStartTime

public long getGBeanStartTime(String shortName,
                              Class type)
                       throws GBeanNotFoundException
Specified by:
getGBeanStartTime in interface Kernel
Throws:
GBeanNotFoundException

getAttribute

public Object getAttribute(ObjectName objectName,
                           String attributeName)
                    throws Exception
Specified by:
getAttribute in interface Kernel
Throws:
Exception

getAttribute

public Object getAttribute(AbstractName abstractName,
                           String attributeName)
                    throws GBeanNotFoundException,
                           NoSuchAttributeException,
                           Exception
Specified by:
getAttribute in interface Kernel
Throws:
GBeanNotFoundException
NoSuchAttributeException
Exception

getAttribute

public Object getAttribute(String shortName,
                           String attributeName)
                    throws GBeanNotFoundException,
                           NoSuchAttributeException,
                           Exception
Specified by:
getAttribute in interface Kernel
Throws:
GBeanNotFoundException
NoSuchAttributeException
Exception

getAttribute

public Object getAttribute(Class type,
                           String attributeName)
                    throws GBeanNotFoundException,
                           NoSuchAttributeException,
                           Exception
Specified by:
getAttribute in interface Kernel
Throws:
GBeanNotFoundException
NoSuchAttributeException
Exception

getAttribute

public Object getAttribute(String shortName,
                           Class type,
                           String attributeName)
                    throws GBeanNotFoundException,
                           NoSuchAttributeException,
                           Exception
Specified by:
getAttribute in interface Kernel
Throws:
GBeanNotFoundException
NoSuchAttributeException
Exception

setAttribute

public void setAttribute(AbstractName abstractName,
                         String attributeName,
                         Object attributeValue)
                  throws GBeanNotFoundException,
                         NoSuchAttributeException,
                         Exception
Specified by:
setAttribute in interface Kernel
Throws:
GBeanNotFoundException
NoSuchAttributeException
Exception

setAttribute

public void setAttribute(String shortName,
                         String attributeName,
                         Object attributeValue)
                  throws GBeanNotFoundException,
                         NoSuchAttributeException,
                         Exception
Specified by:
setAttribute in interface Kernel
Throws:
GBeanNotFoundException
NoSuchAttributeException
Exception

setAttribute

public void setAttribute(Class type,
                         String attributeName,
                         Object attributeValue)
                  throws GBeanNotFoundException,
                         NoSuchAttributeException,
                         Exception
Specified by:
setAttribute in interface Kernel
Throws:
GBeanNotFoundException
NoSuchAttributeException
Exception

setAttribute

public void setAttribute(String shortName,
                         Class type,
                         String attributeName,
                         Object attributeValue)
                  throws GBeanNotFoundException,
                         NoSuchAttributeException,
                         Exception
Specified by:
setAttribute in interface Kernel
Throws:
GBeanNotFoundException
NoSuchAttributeException
Exception

invoke

public Object invoke(ObjectName objectName,
                     String methodName)
              throws Exception
Specified by:
invoke in interface Kernel
Throws:
Exception

invoke

public Object invoke(AbstractName abstractName,
                     String methodName)
              throws GBeanNotFoundException,
                     NoSuchOperationException,
                     InternalKernelException,
                     Exception
Specified by:
invoke in interface Kernel
Throws:
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception

invoke

public Object invoke(String shortName,
                     String methodName)
              throws GBeanNotFoundException,
                     NoSuchOperationException,
                     InternalKernelException,
                     Exception
Specified by:
invoke in interface Kernel
Throws:
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception

invoke

public Object invoke(Class type,
                     String methodName)
              throws GBeanNotFoundException,
                     NoSuchOperationException,
                     InternalKernelException,
                     Exception
Specified by:
invoke in interface Kernel
Throws:
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception

invoke

public Object invoke(String shortName,
                     Class type,
                     String methodName)
              throws GBeanNotFoundException,
                     NoSuchOperationException,
                     InternalKernelException,
                     Exception
Specified by:
invoke in interface Kernel
Throws:
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception

invoke

public Object invoke(ObjectName objectName,
                     String methodName,
                     Object[] args,
                     String[] types)
              throws Exception
Specified by:
invoke in interface Kernel
Throws:
Exception

getStateReason

public String getStateReason(AbstractName abstractName)
Specified by:
getStateReason in interface Kernel

invoke

public Object invoke(AbstractName abstractName,
                     String methodName,
                     Object[] args,
                     String[] types)
              throws GBeanNotFoundException,
                     NoSuchOperationException,
                     InternalKernelException,
                     Exception
Specified by:
invoke in interface Kernel
Throws:
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception

invoke

public Object invoke(String shortName,
                     String methodName,
                     Object[] args,
                     String[] types)
              throws GBeanNotFoundException,
                     NoSuchOperationException,
                     InternalKernelException,
                     Exception
Specified by:
invoke in interface Kernel
Throws:
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception

invoke

public Object invoke(Class type,
                     String methodName,
                     Object[] args,
                     String[] types)
              throws GBeanNotFoundException,
                     NoSuchOperationException,
                     InternalKernelException,
                     Exception
Specified by:
invoke in interface Kernel
Throws:
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception

invoke

public Object invoke(String shortName,
                     Class type,
                     String methodName,
                     Object[] args,
                     String[] types)
              throws GBeanNotFoundException,
                     NoSuchOperationException,
                     InternalKernelException,
                     Exception
Specified by:
invoke in interface Kernel
Throws:
GBeanNotFoundException
NoSuchOperationException
InternalKernelException
Exception

isLoaded

public boolean isLoaded(AbstractName name)
Specified by:
isLoaded in interface Kernel

isLoaded

public boolean isLoaded(String shortName)
Specified by:
isLoaded in interface Kernel

isLoaded

public boolean isLoaded(Class type)
Specified by:
isLoaded in interface Kernel

isLoaded

public boolean isLoaded(String shortName,
                        Class type)
Specified by:
isLoaded in interface Kernel

getGBeanInfo

public GBeanInfo getGBeanInfo(ObjectName name)
                       throws GBeanNotFoundException
Specified by:
getGBeanInfo in interface Kernel
Throws:
GBeanNotFoundException

getGBeanInfo

public GBeanInfo getGBeanInfo(AbstractName name)
                       throws GBeanNotFoundException
Specified by:
getGBeanInfo in interface Kernel
Throws:
GBeanNotFoundException

getGBeanInfo

public GBeanInfo getGBeanInfo(String shortName)
                       throws GBeanNotFoundException
Specified by:
getGBeanInfo in interface Kernel
Throws:
GBeanNotFoundException

getGBeanInfo

public GBeanInfo getGBeanInfo(Class type)
                       throws GBeanNotFoundException
Specified by:
getGBeanInfo in interface Kernel
Throws:
GBeanNotFoundException

getGBeanInfo

public GBeanInfo getGBeanInfo(String shortName,
                              Class type)
                       throws GBeanNotFoundException
Specified by:
getGBeanInfo in interface Kernel
Throws:
GBeanNotFoundException

listGBeans

public Set listGBeans(ObjectName pattern)
Specified by:
listGBeans in interface Kernel

listGBeans

public Set listGBeans(Set patterns)
Specified by:
listGBeans in interface Kernel

registerShutdownHook

public void registerShutdownHook(Runnable hook)
Specified by:
registerShutdownHook in interface Kernel

unregisterShutdownHook

public void unregisterShutdownHook(Runnable hook)
Specified by:
unregisterShutdownHook in interface Kernel

shutdown

public void shutdown()
Specified by:
shutdown in interface Kernel

getClassLoaderFor

public ClassLoader getClassLoaderFor(AbstractName name)
                              throws GBeanNotFoundException
Specified by:
getClassLoaderFor in interface Kernel
Throws:
GBeanNotFoundException

getClassLoaderFor

public ClassLoader getClassLoaderFor(String shortName)
                              throws GBeanNotFoundException
Specified by:
getClassLoaderFor in interface Kernel
Throws:
GBeanNotFoundException

getClassLoaderFor

public ClassLoader getClassLoaderFor(Class type)
                              throws GBeanNotFoundException
Specified by:
getClassLoaderFor in interface Kernel
Throws:
GBeanNotFoundException

getClassLoaderFor

public ClassLoader getClassLoaderFor(String shortName,
                                     Class type)
                              throws GBeanNotFoundException
Specified by:
getClassLoaderFor in interface Kernel
Throws:
GBeanNotFoundException

getGBeanData

public GBeanData getGBeanData(AbstractName name)
                       throws GBeanNotFoundException,
                              InternalKernelException
Specified by:
getGBeanData in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException

getGBeanData

public GBeanData getGBeanData(String shortName)
                       throws GBeanNotFoundException,
                              InternalKernelException
Specified by:
getGBeanData in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException

getGBeanData

public GBeanData getGBeanData(Class type)
                       throws GBeanNotFoundException,
                              InternalKernelException
Specified by:
getGBeanData in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException

getGBeanData

public GBeanData getGBeanData(String shortName,
                              Class type)
                       throws GBeanNotFoundException,
                              InternalKernelException
Specified by:
getGBeanData in interface Kernel
Throws:
GBeanNotFoundException
InternalKernelException

getAbstractNameFor

public AbstractName getAbstractNameFor(Object service)
Specified by:
getAbstractNameFor in interface Kernel

getShortNameFor

public String getShortNameFor(Object service)
Specified by:
getShortNameFor in interface Kernel

isRunning

public boolean isRunning()
Specified by:
isRunning in interface Kernel

listGBeans

public Set listGBeans(AbstractNameQuery query)
Specified by:
listGBeans in interface Kernel

getDependencyManager

public DependencyManager getDependencyManager()
Throws UnsupportedOperationException. The dependency manager is not accesable over a remote connection.

Specified by:
getDependencyManager in interface Kernel

getLifecycleMonitor

public LifecycleMonitor getLifecycleMonitor()
Throws UnsupportedOperationException. The lifecycle monitor is not accesable over a remote connection.

Specified by:
getLifecycleMonitor in interface Kernel

getProxyManager

public ProxyManager getProxyManager()
Specified by:
getProxyManager in interface Kernel

boot

public void boot()
          throws Exception
Throws UnsupportedOperationException. A remote kernel will alreayd be booted.

Specified by:
boot in interface Kernel
Throws:
Exception


Copyright © 2003-2011 The Apache Geronimo development community. All Rights Reserved.