org.apache.geronimo.console.util
Class KernelManagementHelper

java.lang.Object
  extended by org.apache.geronimo.console.util.KernelManagementHelper
All Implemented Interfaces:
ManagementHelper

public class KernelManagementHelper
extends Object
implements ManagementHelper

An implementation of the ManagementHelper interface that uses a Geronimo kernel. That must be an in-VM kernel.


Constructor Summary
KernelManagementHelper(Kernel kernel)
           
 
Method Summary
 void addGBeanToConfiguration(Artifact configID, GBeanData gbean, boolean start)
          Adds a new GBean to an existing Configuration.
 Object[] findByInterface(Class iface)
           
 ResourceAdapterModule[] getAdminObjectModules(J2EEServer server, String[] adminObjectInterfaces)
           
 JCAAdminObject[] getAdminObjects(JCAResource resource)
           
 JCAAdminObject[] getAdminObjects(ResourceAdapterModule module, String[] adminObjectInterfaces)
           
 AppClientModule[] getAppClients(J2EEApplication application)
           
 AppClientModule[] getAppClients(J2EEServer server)
           
 J2EEApplication[] getApplications(J2EEServer server)
           
 Artifact getConfigurationNameFor(AbstractName abstractName)
           
 ConfigurationData[] getConfigurations(ConfigurationModuleType type, boolean includeChildModules)
           
 JCAConnectionFactory[] getConnectionFactories(JCAResource resource)
           
 JDBCDataSource[] getDataSource(JDBCResource resource)
           
 J2EEDeployedObject[] getDeployedObjects(J2EEServer server)
           
 J2EEDomain[] getDomains()
           
 JDBCDriver[] getDriver(JDBCDataSource dataSource)
           
 EJBModule[] getEJBModules(J2EEApplication application)
           
 EJBModule[] getEJBModules(J2EEServer server)
           
 EJB[] getEJBs(EJBModule module)
           
 String getGBeanDescription(AbstractName abstractName)
           
 Object[] getGBeansImplementing(Class iface)
           
 JVM[] getJavaVMs(J2EEServer server)
           
 JCAResource[] getJCAResources(J2EEApplication application)
           
 JCAResource[] getJCAResources(J2EEServer server)
           
 JDBCResource[] getJDBCResources(J2EEApplication application)
           
 JDBCResource[] getJDBCResources(J2EEServer server)
           
 JMSResource[] getJMSResources(J2EEApplication application)
           
 JMSResource[] getJMSResources(J2EEServer server)
           
 JCAManagedConnectionFactory getManagedConnectionFactory(JCAConnectionFactory factory)
           
 J2EEDeployedObject getModuleForConfiguration(Artifact configuration)
          Gets a JSR-77 Module (WebModule, EJBModule, etc.) for the specified configuration.
 J2EEModule[] getModules(J2EEApplication application)
           
 AbstractName getNameFor(Object component)
           
 Naming getNaming()
          This method returns the Naming object of the kernel.
 Object getObject(AbstractName objectName)
           
 JCAManagedConnectionFactory[] getOutboundFactories(J2EEServer server, String connectionFactoryInterface)
           
 JCAManagedConnectionFactory[] getOutboundFactories(ResourceAdapterModule module)
           
 JCAManagedConnectionFactory[] getOutboundFactories(ResourceAdapterModule module, String connectionFactoryInterface)
           
 JCAManagedConnectionFactory[] getOutboundFactories(ResourceAdapterModule module, String[] connectionFactoryInterfaces)
           
 ResourceAdapterModule[] getOutboundRAModules(J2EEServer server, String connectionFactoryInterface)
           
 ResourceAdapterModule[] getOutboundRAModules(J2EEServer server, String[] connectionFactoryInterfaces)
           
 ResourceAdapterModule[] getRAModules(J2EEApplication application)
           
 ResourceAdapterModule[] getRAModules(J2EEServer server)
           
 JCAResource[] getRAResources(ResourceAdapter adapter)
           
static KernelManagementHelper getRemoteKernelManager(String host, String user, String password)
          Helper method to connect to a remote kernel.
 ResourceAdapter[] getResourceAdapters(ResourceAdapterModule module)
           
 J2EEResource[] getResources(J2EEServer server)
           
 J2EEServer[] getServers(J2EEDomain domain)
           
 Servlet[] getServlets(WebModule module)
           
 SystemLog getSystemLog(JVM jvm)
           
 WebModule[] getWebModules(J2EEApplication application)
           
 WebModule[] getWebModules(J2EEServer server)
           
 void testLoginModule(J2EEServer server, LoginModule module, Map options)
           
 Subject testLoginModule(J2EEServer server, LoginModule module, Map options, String username, String password)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KernelManagementHelper

public KernelManagementHelper(Kernel kernel)
Method Detail

getDomains

public J2EEDomain[] getDomains()
Specified by:
getDomains in interface ManagementHelper

getServers

public J2EEServer[] getServers(J2EEDomain domain)

getDeployedObjects

public J2EEDeployedObject[] getDeployedObjects(J2EEServer server)

getApplications

public J2EEApplication[] getApplications(J2EEServer server)
Specified by:
getApplications in interface ManagementHelper

getAppClients

public AppClientModule[] getAppClients(J2EEServer server)
Specified by:
getAppClients in interface ManagementHelper

getWebModules

public WebModule[] getWebModules(J2EEServer server)
Specified by:
getWebModules in interface ManagementHelper

getEJBModules

public EJBModule[] getEJBModules(J2EEServer server)
Specified by:
getEJBModules in interface ManagementHelper

getRAModules

public ResourceAdapterModule[] getRAModules(J2EEServer server)
Specified by:
getRAModules in interface ManagementHelper

getOutboundFactories

public JCAManagedConnectionFactory[] getOutboundFactories(J2EEServer server,
                                                          String connectionFactoryInterface)
Specified by:
getOutboundFactories in interface ManagementHelper

getOutboundRAModules

public ResourceAdapterModule[] getOutboundRAModules(J2EEServer server,
                                                    String connectionFactoryInterface)
Specified by:
getOutboundRAModules in interface ManagementHelper

getOutboundRAModules

public ResourceAdapterModule[] getOutboundRAModules(J2EEServer server,
                                                    String[] connectionFactoryInterfaces)
Specified by:
getOutboundRAModules in interface ManagementHelper

getAdminObjectModules

public ResourceAdapterModule[] getAdminObjectModules(J2EEServer server,
                                                     String[] adminObjectInterfaces)
Specified by:
getAdminObjectModules in interface ManagementHelper

getOutboundFactories

public JCAManagedConnectionFactory[] getOutboundFactories(ResourceAdapterModule module)
Specified by:
getOutboundFactories in interface ManagementHelper

getOutboundFactories

public JCAManagedConnectionFactory[] getOutboundFactories(ResourceAdapterModule module,
                                                          String connectionFactoryInterface)
Specified by:
getOutboundFactories in interface ManagementHelper

getOutboundFactories

public JCAManagedConnectionFactory[] getOutboundFactories(ResourceAdapterModule module,
                                                          String[] connectionFactoryInterfaces)
Specified by:
getOutboundFactories in interface ManagementHelper

getAdminObjects

public JCAAdminObject[] getAdminObjects(ResourceAdapterModule module,
                                        String[] adminObjectInterfaces)
Specified by:
getAdminObjects in interface ManagementHelper

getResources

public J2EEResource[] getResources(J2EEServer server)

getJCAResources

public JCAResource[] getJCAResources(J2EEServer server)
Specified by:
getJCAResources in interface ManagementHelper

getJDBCResources

public JDBCResource[] getJDBCResources(J2EEServer server)
Specified by:
getJDBCResources in interface ManagementHelper

getJMSResources

public JMSResource[] getJMSResources(J2EEServer server)
Specified by:
getJMSResources in interface ManagementHelper

getJavaVMs

public JVM[] getJavaVMs(J2EEServer server)
Specified by:
getJavaVMs in interface ManagementHelper

getSystemLog

public SystemLog getSystemLog(JVM jvm)
Specified by:
getSystemLog in interface ManagementHelper

getModules

public J2EEModule[] getModules(J2EEApplication application)
Specified by:
getModules in interface ManagementHelper

getAppClients

public AppClientModule[] getAppClients(J2EEApplication application)
Specified by:
getAppClients in interface ManagementHelper

getWebModules

public WebModule[] getWebModules(J2EEApplication application)
Specified by:
getWebModules in interface ManagementHelper

getEJBModules

public EJBModule[] getEJBModules(J2EEApplication application)
Specified by:
getEJBModules in interface ManagementHelper

getRAModules

public ResourceAdapterModule[] getRAModules(J2EEApplication application)
Specified by:
getRAModules in interface ManagementHelper

getJCAResources

public JCAResource[] getJCAResources(J2EEApplication application)
Specified by:
getJCAResources in interface ManagementHelper

getJDBCResources

public JDBCResource[] getJDBCResources(J2EEApplication application)
Specified by:
getJDBCResources in interface ManagementHelper

getJMSResources

public JMSResource[] getJMSResources(J2EEApplication application)
Specified by:
getJMSResources in interface ManagementHelper

getEJBs

public EJB[] getEJBs(EJBModule module)
Specified by:
getEJBs in interface ManagementHelper

getServlets

public Servlet[] getServlets(WebModule module)
Specified by:
getServlets in interface ManagementHelper

getResourceAdapters

public ResourceAdapter[] getResourceAdapters(ResourceAdapterModule module)
Specified by:
getResourceAdapters in interface ManagementHelper

getRAResources

public JCAResource[] getRAResources(ResourceAdapter adapter)
Specified by:
getRAResources in interface ManagementHelper

getDataSource

public JDBCDataSource[] getDataSource(JDBCResource resource)
Specified by:
getDataSource in interface ManagementHelper

getDriver

public JDBCDriver[] getDriver(JDBCDataSource dataSource)
Specified by:
getDriver in interface ManagementHelper

getConnectionFactories

public JCAConnectionFactory[] getConnectionFactories(JCAResource resource)
Specified by:
getConnectionFactories in interface ManagementHelper

getAdminObjects

public JCAAdminObject[] getAdminObjects(JCAResource resource)

getManagedConnectionFactory

public JCAManagedConnectionFactory getManagedConnectionFactory(JCAConnectionFactory factory)
Specified by:
getManagedConnectionFactory in interface ManagementHelper

getObject

public Object getObject(AbstractName objectName)
Specified by:
getObject in interface ManagementHelper

getConfigurationNameFor

public Artifact getConfigurationNameFor(AbstractName abstractName)
Specified by:
getConfigurationNameFor in interface ManagementHelper

getGBeanDescription

public String getGBeanDescription(AbstractName abstractName)
Specified by:
getGBeanDescription in interface ManagementHelper

testLoginModule

public void testLoginModule(J2EEServer server,
                            LoginModule module,
                            Map options)
Specified by:
testLoginModule in interface ManagementHelper

testLoginModule

public Subject testLoginModule(J2EEServer server,
                               LoginModule module,
                               Map options,
                               String username,
                               String password)
                        throws LoginException
Specified by:
testLoginModule in interface ManagementHelper
Throws:
LoginException

findByInterface

public Object[] findByInterface(Class iface)
Specified by:
findByInterface in interface ManagementHelper

getNameFor

public AbstractName getNameFor(Object component)
Specified by:
getNameFor in interface ManagementHelper

getConfigurations

public ConfigurationData[] getConfigurations(ConfigurationModuleType type,
                                             boolean includeChildModules)
Specified by:
getConfigurations in interface ManagementHelper

getModuleForConfiguration

public J2EEDeployedObject getModuleForConfiguration(Artifact configuration)
Gets a JSR-77 Module (WebModule, EJBModule, etc.) for the specified configuration. Note: this only works if the configuration is running at the time you ask.

Specified by:
getModuleForConfiguration in interface ManagementHelper
Returns:
The Module, or null if the configuration is not running.

getGBeansImplementing

public Object[] getGBeansImplementing(Class iface)
Specified by:
getGBeansImplementing in interface ManagementHelper

addGBeanToConfiguration

public void addGBeanToConfiguration(Artifact configID,
                                    GBeanData gbean,
                                    boolean start)
Adds a new GBean to an existing Configuration.

Specified by:
addGBeanToConfiguration in interface ManagementHelper
Parameters:
configID - The configuration to add the GBean to.
gbean - The data representing the GBean to add.
start - If true, the GBean should be started as part of this call.

getNaming

public Naming getNaming()
This method returns the Naming object of the kernel.

Specified by:
getNaming in interface ManagementHelper

getRemoteKernelManager

public static KernelManagementHelper getRemoteKernelManager(String host,
                                                            String user,
                                                            String password)
                                                     throws IOException
Helper method to connect to a remote kernel.

Throws:
IOException


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.