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