JMXConfiguration.java revision 639
0N/A/*
0N/A * CDDL HEADER START
0N/A *
0N/A * The contents of this file are subject to the terms of the
407N/A * Common Development and Distribution License (the "License").
0N/A * You may not use this file except in compliance with the License.
0N/A *
0N/A * See LICENSE.txt included in this distribution for the specific
0N/A * language governing permissions and limitations under the License.
0N/A *
0N/A * When distributing Covered Code, include this CDDL HEADER in each
0N/A * file and include the License file at LICENSE.txt.
0N/A * If applicable, add the following below this CDDL HEADER, with the
0N/A * fields enclosed by brackets "[]" replaced with your own identifying
0N/A * information: Portions Copyright [yyyy] [name of copyright owner]
0N/A *
0N/A * CDDL HEADER END
0N/A */
0N/A
0N/A/*
1269N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
0N/A * Use is subject to license terms.
0N/A */
0N/A
0N/Apackage org.opensolaris.opengrok.management;
1269N/A
0N/Aimport java.io.IOException;
1318N/Aimport org.opensolaris.opengrok.configuration.Configuration;
0N/Aimport org.opensolaris.opengrok.configuration.RuntimeEnvironment;
0N/A
394N/A/**
937N/A *
394N/A * @author Jan Berg
394N/A */
1238N/Apublic class JMXConfiguration implements JMXConfigurationMBean {
1318N/A
394N/A public String getConfiguration() {
394N/A return RuntimeEnvironment.getInstance().getConfiguration().getXMLRepresentationAsString();
394N/A }
394N/A
394N/A public void setConfiguration(String config) throws IOException {
816N/A Configuration configuration = Configuration.makeXMLStringAsConfiguration(config);
928N/A RuntimeEnvironment.getInstance().setConfiguration(configuration);
394N/A }
394N/A}
1318N/A