org.jboss.system
Class ServiceConfigurator

java.lang.Object
  extended byorg.jboss.system.ServiceConfigurator

public class ServiceConfigurator
extends java.lang.Object

Service configuration helper.


Constructor Summary
ServiceConfigurator(MBeanServer (src)  server, ServiceController (src)  serviceController, ServiceCreator (src)  serviceCreator)
           
 
Method Summary
protected  void configure(ObjectName (src)  objectName, ObjectName (src)  loaderName, org.w3c.dom.Element mbeanElement, java.util.List mbeans)
          The configure method configures an mbean based on the xml element configuration passed in.
 java.lang.String getConfiguration(ObjectName (src) [] objectNames)
          Builds a string that consists of the configuration elements of the currently running MBeans registered in the server.
 java.util.List install(org.w3c.dom.Element config, ObjectName (src)  loaderName)
          The install method iterates through the mbean tags in the supplied xml configuration and creates and configures the mbeans shown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceConfigurator

public ServiceConfigurator(MBeanServer (src)  server,
                           ServiceController (src)  serviceController,
                           ServiceCreator (src)  serviceCreator)
Method Detail

install

public java.util.List install(org.w3c.dom.Element config,
                              ObjectName (src)  loaderName)
                       throws DeploymentException (src) 
The install method iterates through the mbean tags in the supplied xml configuration and creates and configures the mbeans shown. The mbean configuration can be nested.

Parameters:
config - the xml Element containing the configuration of the mbeans to create and configure.
Returns:
a List of ObjectNames of created mbeans.
Throws:
DeploymentException (src) - if an error occurs

configure

protected void configure(ObjectName (src)  objectName,
                         ObjectName (src)  loaderName,
                         org.w3c.dom.Element mbeanElement,
                         java.util.List mbeans)
                  throws java.lang.Exception
The configure method configures an mbean based on the xml element configuration passed in. Three formats are supported: <attribute name="(name)">(value)</attribute> <depends optional-attribute-name="(name)">(object name of mbean referenced)</depends> <depends-list optional-attribute-name="(name)"> [list of] </depends-list-element>(object name)</depends-list-element> </depends-list> The last two can include nested mbean configurations or ObjectNames. SIDE-EFFECT: adds all mbeans this one depends on to the ServiceContext structures.

Parameters:
mbeanElement - an Element value
Throws:
java.lang.Exception - if an error occurs

getConfiguration

public java.lang.String getConfiguration(ObjectName (src) [] objectNames)
                                  throws java.lang.Exception
Builds a string that consists of the configuration elements of the currently running MBeans registered in the server.

Throws:
java.lang.Exception - Failed to construct configuration.