cz.cuni.amis.pogamut.base.utils.logging.jmx
Class LogCategoriesJMXProxy

Package class diagram package LogCategoriesJMXProxy
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.utils.logging.AbstractLogCategories
      extended by cz.cuni.amis.pogamut.base.utils.logging.jmx.LogCategoriesJMXProxy
All Implemented Interfaces:
ILogCategories

public class LogCategoriesJMXProxy
extends AbstractLogCategories

Author:
ik

Constructor Summary
LogCategoriesJMXProxy(MBeanServerConnection mbsc, ObjectName parentName)
           
 
Method Summary
protected  Map<String,LogCategory> getCategoriesInternal()
           
 LogCategory getCategory(String name)
          Returns existing category by the name or adds new one.
 String[] getCategoryNames()
          Returns names of all existing log categories.
 
Methods inherited from class cz.cuni.amis.pogamut.base.utils.logging.AbstractLogCategories
addLogCategory, getCategories, getCategoryNamesSorted, hasCategory, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogCategoriesJMXProxy

public LogCategoriesJMXProxy(MBeanServerConnection mbsc,
                             ObjectName parentName)
                      throws cz.cuni.amis.utils.exception.PogamutJMXException
Throws:
cz.cuni.amis.utils.exception.PogamutJMXException
Method Detail

getCategoriesInternal

protected Map<String,LogCategory> getCategoriesInternal()
Specified by:
getCategoriesInternal in class AbstractLogCategories
Returns:
Muttable map with categories.

getCategory

public LogCategory getCategory(String name)
Description copied from interface: ILogCategories
Returns existing category by the name or adds new one.

Note that new category doesn't have any handler appended, you have to create at least one for the category to produce something.

Example:

LogCategory myCategory = categories.getCategory("my log"); // create new category
myCategory.newHandler(new LogPublisher.ConsolePublisher()); // add new handler with output to the console

Returns:

getCategoryNames

public String[] getCategoryNames()
Description copied from class: AbstractLogCategories
Returns names of all existing log categories.

Specified by:
getCategoryNames in interface ILogCategories
Overrides:
getCategoryNames in class AbstractLogCategories
Returns:


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.