|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.system.ServiceConfigurator
public class ServiceConfigurator
Service configuration helper.
Constructor Summary | |
---|---|
ServiceConfigurator(MBeanServer server,
ServiceController serviceController,
ServiceCreator serviceCreator)
Deprecated. the service controller no longer uses the service configurator and vice-versa |
Method Summary | |
---|---|
static void |
configure(MBeanServer server,
ServiceController controller,
ObjectName objectName,
ClassLoader cl,
Collection<ServiceAttributeMetaData> attrs)
Configure an MBean |
static void |
configure(MBeanServer server,
ServiceController controller,
ObjectName objectName,
ObjectName classLoaderName,
Collection<ServiceAttributeMetaData> attrs)
Configure an MBean |
static HashMap<String,MBeanAttributeInfo> |
getAttributeMap(MBeanServer server,
ObjectName objectName)
Get an attribute map for the MBean |
static String |
getConfiguration(MBeanServer server,
ServiceController serviceController,
ObjectName[] objectNames)
Builds a string that consists of the configuration elements of the currently running MBeans registered in the server. |
String |
getConfiguration(ObjectName[] objectNames)
Builds a string that consists of the configuration elements of the currently running MBeans registered in the server. |
static StringBuffer |
getElementContent(Element element)
A utility method that transforms the contents of the argument element into a StringBuffer representation that can be reparsed. |
List<ObjectName> |
install(Element config,
ObjectName loaderName)
Deprecated. the service controller no longer uses the service configurator and vice-versa |
static Exception |
rethrow(String context,
Throwable t)
Rethrow an error as an exception |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceConfigurator(MBeanServer server, ServiceController serviceController, ServiceCreator serviceCreator)
server
- the mbean serverserviceController
- the servie controllerserviceCreator
- the service creatorMethod Detail |
---|
public static Exception rethrow(String context, Throwable t) throws Exception
context
- the contextt
- the original throwable
Exception
- alwayspublic static void configure(MBeanServer server, ServiceController controller, ObjectName objectName, ObjectName classLoaderName, Collection<ServiceAttributeMetaData> attrs) throws Exception
server
- the servercontroller
- the service controllerobjectName
- the object nameclassLoaderName
- the classloader object nameattrs
- the attributes
Exception
- for any errorpublic static void configure(MBeanServer server, ServiceController controller, ObjectName objectName, ClassLoader cl, Collection<ServiceAttributeMetaData> attrs) throws Exception
server
- the servercontroller
- the service controllerobjectName
- the object namecl
- the classloaderattrs
- the attributes
Exception
- for any errorpublic static HashMap<String,MBeanAttributeInfo> getAttributeMap(MBeanServer server, ObjectName objectName) throws Exception
server
- the serverobjectName
- the object name
Exception
- for any errorpublic List<ObjectName> install(Element config, ObjectName loaderName) throws Exception
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.
config
- the xml Element
containing the configuration of
the mbeans to create and configure.loaderName
- the classloader's ObjectName
List
of ObjectNames of created mbeans.
Exception
- if an error occurspublic static String getConfiguration(MBeanServer server, ServiceController serviceController, ObjectName[] objectNames) throws Exception
server
- the MBeanServerserviceController
- the service controllerobjectNames
- the object names to retrieve
Exception
- Failed to construct configuration.public String getConfiguration(ObjectName[] objectNames) throws Exception
objectNames
- the object names
Exception
- Failed to construct configuration.public static StringBuffer getElementContent(Element element) throws IOException, TransformerException
element
- - the parent dom element whose contents are to be extracted as an xml document string.
IOException
- for an error during IO
TransformerException
- for an erro during transformation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |