/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.logging;

/**
 * MBean interface.
 */
public interface Log4jServiceMBean extends org.jboss.system.ServiceMBean {

   //default object name
   public static final javax.management.ObjectName OBJECT_NAME = org.jboss.mx.util.ObjectNameFactory.create("jboss.system:type=Log4jService,service=Logging");

   /**
    * Set the catch <tt>System.out</tt> flag.
    * @param flag True to enable, false to disable.    */
  void setCatchSystemOut(boolean flag) ;

   /**
    * Get the catch <tt>System.out</tt> flag.
    * @return True if enabled, false if disabled.    */
  boolean getCatchSystemOut() ;

   /**
    * Set the catch <tt>System.err</tt> flag.
    * @param flag True to enable, false to disable.    */
  void setCatchSystemErr(boolean flag) ;

   /**
    * Get the catch <tt>System.err</tt> flag.
    * @return True if enabled, false if disabled.    */
  boolean getCatchSystemErr() ;

   /**
    * Get the org.apache.log4j.helpers.LogLog.setQuietMode flag
    * @return True if enabled, false if disabled.    */
  boolean getLog4jQuietMode() ;

   /**
    * Set the org.apache.log4j.helpers.LogLog.setQuietMode flag
    * @return True if enabled, false if disabled.    */
  void setLog4jQuietMode(boolean flag) ;

   /**
    * Get the refresh period.
    */
  int getRefreshPeriod() ;

   /**
    * Set the refresh period.
    */
  void setRefreshPeriod(int refreshPeriod) ;

   /**
    * Get the Log4j configuration URL.
    */
  java.net.URL getConfigurationURL() ;

   /**
    * Set the Log4j configuration URL.
    */
  void setConfigurationURL(java.net.URL url) ;

   /**
    * Sets the level for a logger of the give name. <p>Values are trimmed before used.
    * @param name The name of the logger to change level
    * @param levelName The name of the level to change the logger to.    */
  void setLoggerLevel(java.lang.String name,java.lang.String levelName) ;

   /**
    * Sets the levels of each logger specified by the given comma seperated list of logger names.
    * @see #setLoggerLevel
    * @param list A comma seperated list of logger names.
    * @param levelName The name of the level to change the logger to.    */
  void setLoggerLevels(java.lang.String list,java.lang.String levelName) ;

   /**
    * Gets the level of the logger of the give name.
    * @param name The name of the logger to inspect.    */
  java.lang.String getLoggerLevel(java.lang.String name) ;

   /**
    * Force the logging system to reconfigure.
    */
  void reconfigure() throws java.io.IOException;

   /**
    * Hack to reconfigure and change the URL. This is needed until we have a JMX HTML Adapter that can use PropertyEditor to coerce.
    * @param url The new configuration url    */
  void reconfigure(java.lang.String url) throws java.io.IOException, java.net.MalformedURLException;

}
