JBoss API: Class ConfigurationService
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.management.NotificationBroadcasterSupport | +--org.jboss.util.ServiceMBeanSupport | +--org.jboss.configuration.ConfigurationService
The ConfigurationService MBean is loaded when JBoss starts up by the JMX MLet.
The ConfigurationService in turn loads the jboss.jcml configuration
when loadConfiguration()
is invoked. This instantiates JBoss
specific mbean services that wish to be controlled by the JBoss
ServiceControl
/Service
lifecycle service.
Service
,
ServiceControl
Field Summary | |
static java.lang.String |
CONFIGURATION_FILE
The name of the file initial configuration is read from. |
static java.lang.String |
RUNNING_STATE_FILE
The name of the file that running state will be written into. |
Fields inherited from class org.jboss.util.ServiceMBeanSupport |
log, server |
Fields inherited from interface org.jboss.configuration.ConfigurationServiceMBean |
OBJECT_NAME |
Fields inherited from interface org.jboss.util.ServiceMBean |
STARTED, STARTING, states, STOPPED, STOPPING |
Constructor Summary | |
ConfigurationService()
Construct a ConfigurationService that auto-trim attribute values. |
|
ConfigurationService(boolean autoTrim)
Construct a ConfigurationService. |
Method Summary | |
boolean |
getAutoTrim()
Get the attribute value auto-trim flag. |
java.lang.String |
getName()
Return the name of the service. |
javax.management.ObjectName |
getObjectName(javax.management.MBeanServer server,
javax.management.ObjectName name)
Get the name of this object. |
void |
load(org.w3c.dom.Document configuration)
Parses the given configuration document and sets MBean attributes. |
void |
loadConfiguration()
Load the configuration from the CONFIGURATION_FILE ,
installs and initailize configured MBeans and registeres the
beans as services. |
java.lang.String |
save()
Builds a string that consists of the configuration elements of the currently running MBeans registered in the server. |
void |
saveConfiguration()
Saves the current configuration of each registered MBean to the RUNNING_STATE_FILE file. |
Methods inherited from class org.jboss.util.ServiceMBeanSupport |
destroy, destroyService, getServer, getState, getStateString, init, initService, nextSequenceNumber, postDeregister, postRegister, preDeregister, preRegister, start, startService, stop, stopService |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CONFIGURATION_FILE
public static final java.lang.String RUNNING_STATE_FILE
Constructor Detail |
public ConfigurationService(boolean autoTrim)
autoTrim
- True to enable auto-trimming of attribute values.public ConfigurationService()
Method Detail |
public boolean getAutoTrim()
getAutoTrim
in interface ConfigurationServiceMBean
public javax.management.ObjectName getObjectName(javax.management.MBeanServer server, javax.management.ObjectName name) throws javax.management.MalformedObjectNameException
getObjectName
in class ServiceMBeanSupport
server
- The server which the object is registered in.name
- The user specified object name (ignored).public java.lang.String getName()
getName
in class ServiceMBeanSupport
public void load(org.w3c.dom.Document configuration) throws java.lang.Exception
load
in interface ConfigurationServiceMBean
configuration
- The parsed configuration document.java.lang.Exception
- Failed to load.public java.lang.String save() throws java.lang.Exception
save
in interface ConfigurationServiceMBean
java.lang.Exception
- Failed to construct configuration.public void saveConfiguration() throws java.lang.Exception
RUNNING_STATE_FILE
file. This will only occur if
a file of the that name exists in the classpath.saveConfiguration
in interface ConfigurationServiceMBean
java.lang.Exception
- Failed to save configuration.public void loadConfiguration() throws java.lang.Exception
CONFIGURATION_FILE
,
installs and initailize configured MBeans and registeres the
beans as services.
This is a 2-step process:
loadConfiguration
in interface ConfigurationServiceMBean
java.lang.Exception
- ???
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |