org.ow2.petals.jmx
Class LoggerServiceClient

java.lang.Object
  extended by org.ow2.petals.jmx.AbstractServiceClient
      extended by org.ow2.petals.jmx.LoggerServiceClient

public class LoggerServiceClient
extends AbstractServiceClient

Client API of the JMX Logger service.

Author:
aruffie - EBM Websourcing

Field Summary
 
Fields inherited from class org.ow2.petals.jmx.AbstractServiceClient
JMX_FIELD_NAME, JMX_FIELD_TYPE, JMX_SERVICE_TYPE, mbeanName, mBeanServerConnection, petalsDomain
 
Constructor Summary
LoggerServiceClient(java.lang.String petalsDomain, javax.management.MBeanServerConnection mBeanServerConnection)
           
 
Method Summary
 java.lang.String[] getAllLevels()
          This method allows to retrieve all levels.
 java.lang.String getLevelForLogger(java.lang.String logger)
          Get level value for a specified logger
 void setLevelForLogger(java.lang.String level, java.lang.String logger)
          Set level value for a specified logger
 
Methods inherited from class org.ow2.petals.jmx.AbstractServiceClient
getAttribute, getAttribute, performAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerServiceClient

public LoggerServiceClient(java.lang.String petalsDomain,
                           javax.management.MBeanServerConnection mBeanServerConnection)
                    throws LoggerServiceErrorException,
                           LoggerDoesNotExistException
Throws:
LoggerServiceErrorException
LoggerDoesNotExistException
Method Detail

setLevelForLogger

public void setLevelForLogger(java.lang.String level,
                              java.lang.String logger)
                       throws LoggerServiceErrorException
Set level value for a specified logger

Parameters:
level - The value of the log level that must be set.
logger - The logger name, where the value should be assigned.
Throws:
- if an error occurs while performing the action
LoggerServiceErrorException

getLevelForLogger

public java.lang.String getLevelForLogger(java.lang.String logger)
                                   throws LoggerServiceErrorException
Get level value for a specified logger

Parameters:
logger - The logger name, where the value should be assigned.
Returns:
Throws:
- if an error occurs while performing the action
LoggerServiceErrorException

getAllLevels

public java.lang.String[] getAllLevels()
                                throws LoggerServiceErrorException
This method allows to retrieve all levels.

Returns:
retrieve JDK logging and specific Petals logging .
Throws:
LoggerServiceErrorException


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.