cz.cuni.amis.pogamut.base.utils.logging.jmx
Class 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


Constructor Summary
LogCategoriesJMXProxy(javax.management.MBeanServerConnection mbsc, javax.management.ObjectName parentName)
           
 
Method Summary
protected  java.util.Map<java.lang.String,LogCategory> getCategoriesInternal()
           
 LogCategory getCategory(java.lang.String name)
          Returns existing category by the name or adds new one.
 java.lang.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(javax.management.MBeanServerConnection mbsc,
                             javax.management.ObjectName parentName)
                      throws PogamutJMXException
Throws:
PogamutJMXException
Method Detail

getCategoriesInternal

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

getCategory

public LogCategory getCategory(java.lang.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 java.lang.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: