ManagementMBean.java revision 658
1272N/A/*
1272N/A * CDDL HEADER START
1272N/A *
1272N/A * The contents of this file are subject to the terms of the
1272N/A * Common Development and Distribution License (the "License").
1272N/A * You may not use this file except in compliance with the License.
1272N/A *
1272N/A * See LICENSE.txt included in this distribution for the specific
1272N/A * language governing permissions and limitations under the License.
1272N/A *
1272N/A * When distributing Covered Code, include this CDDL HEADER in each
1272N/A * file and include the License file at LICENSE.txt.
1272N/A * If applicable, add the following below this CDDL HEADER, with the
1272N/A * fields enclosed by brackets "[]" replaced with your own identifying
1272N/A * information: Portions Copyright [yyyy] [name of copyright owner]
1272N/A *
1272N/A * CDDL HEADER END
1272N/A */
1272N/A
1272N/A/*
1272N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
1272N/A * Use is subject to license terms.
1272N/A */
1272N/Apackage org.opensolaris.opengrok.management;
1272N/A
1272N/Aimport java.io.IOException;
1272N/Aimport java.util.Date;
1272N/Aimport java.util.logging.Level;
1272N/A
1272N/A/**
1272N/A * @author Jan S Berg
1272N/A */
1272N/Apublic interface ManagementMBean {
1272N/A
1272N/A /**
1272N/A * Stops the agent, so it is not restarted.
1272N/A */
1272N/A public void stop();
1272N/A
1272N/A /**
1272N/A * Get the xml based configuration file
1272N/A * @return String with the file path and name for xml configuration
1272N/A */
1272N/A public String getConfigurationFile();
1272N/A
1272N/A /**
1272N/A * Set a new name for the xml based configurationfile
1272N/A * @param filename String name with full path of configurationfile
1272N/A */
1272N/A public void setConfigurationFile(String filename);
1272N/A
1272N/A /**
1272N/A * Get the URL to the Publish Server we want to
1272N/A * publish the indexed data
1272N/A * @return String URL to the server (hostname:port)
1272N/A */
1272N/A public String getPublishServerURL();
1272N/A
1272N/A /**
1272N/A * Set the URL to where to publish opengrok indexed data
1272N/A * @param url String to server for publishing the opengrok.war file
1272N/A */
1272N/A public void setPublishServerURL(String url);
1272N/A
1272N/A /**
1272N/A * Set update index database property
1272N/A * @param val Boolean true to also run update index database
1272N/A */
1272N/A public void setUpdateIndexDatabase(Boolean val);
1272N/A
1272N/A /**
1469N/A * Get the udate database property
1272N/A * @return Boolean returns true if update index database is switched on
1272N/A */
1272N/A public Boolean getUpdateIndexDatabase();
1272N/A
1272N/A /**
1272N/A * Set number of Threads to use for indexing
1272N/A */
1272N/A public void setNumberOfThreads(Integer val);
1272N/A
1272N/A /**
1272N/A * Get number of Threads to use for indexing
1272N/A */
1272N/A public Integer getNumberOfThreads();
1272N/A
1272N/A /**
1272N/A * Set subfiles
1272N/A * @param sublist
1272N/A */
1272N/A public void setSubFiles(String[] sublist);
1272N/A
1370N/A /**
1370N/A * Get subfiles
1370N/A * @return get StringArray of subfiles to run through
1370N/A */
1272N/A public String[] getSubFiles();
1272N/A
1272N/A /**
1272N/A * Get a selected property from JAG configuration.
1370N/A * @return String with property value
1272N/A */
1272N/A public String getProperty(String key);
1272N/A
1272N/A /**
1272N/A * Set a selected property in the JAG configuration.
1272N/A * JAG will immediately save its configuration to file when a
1272N/A * property is set.
1272N/A * @param key the String key for the property to be set.
1370N/A * $param value the String value for the property to be set.
1272N/A */
1272N/A public void setProperty(String key, String value);
1272N/A
1370N/A /**
1272N/A * Get the selected System property
1272N/A * @return String with property value
1272N/A */
1272N/A public String getSystemProperty(String key);
1370N/A
1272N/A /**
1272N/A * Set a selected System property
1272N/A * @param key the String key for the property to be set.
1272N/A * $param value the String value for the property to be set.
1272N/A */
1272N/A public void setSystemProperty(String key, String value);
1272N/A
1272N/A /**
1272N/A * Get the selected Environment property
1272N/A * @return String with Environment property value
1272N/A */
1272N/A public String getSystemEnvProperty(String key);
1272N/A
1272N/A /**
1272N/A * Get the time (in milliseconds since 1970) when the agent was started
1272N/A * @return long time when the agent was started, in milliseconds.
1272N/A */
1272N/A public long getStartTime();
1272N/A
1272N/A /**
1272N/A * Get a Date object with the time the agent was started.
1272N/A * @return Date with the starting date
1272N/A */
1272N/A public Date getStartDate();
1272N/A
1272N/A /**
1272N/A * Get the version tag for the agent
1272N/A * @return String the version tag for this agent
1272N/A */
1272N/A public String getVersion();
1272N/A
1272N/A /**
1272N/A * Set the loglevel for the console
1472N/A * @param level the level for console logging
1469N/A */
1272N/A public void setConsoleLogLevel(Level level);
1272N/A
1272N/A /**
1272N/A * Get the current loglevel for the console
1272N/A * @return Level current console loglevel
1272N/A */
public Level getConsoleLogLevel();
/**
* set the file log level
* @param level the level for file logging
*/
public void setFileLogLevel(Level level);
/**
* get the loglevel on the agent logfile
* @return Level for file logging
*/
public Level getFileLogLevel();
/**
* Set the path for the file logging
* @param path String path to where to log
* @throws IOException if path does not exist or could be created on server
*/
public void setFileLogPath(String path) throws IOException;
/**
* Get the file logpath
* @return String file log path
*/
public String getFileLogPath();
}