com.sap.tc.logging
Class Configurator

java.lang.Object
  |
  +--com.sap.tc.logging.Configurator
Direct Known Subclasses:
PropertiesConfigurator, PropertiesConfigurator13

public abstract class Configurator
extends java.lang.Object

Configures the Logging API according to its settings. The configuration is done on demand but it is possible to instruct the configurator to redo it with a specific periodicity.


Method Summary
abstract  void configure()
          Configures tracing and logging according to the settings of the configurator.
 java.lang.ClassLoader getClassLoader()
          Gets the class loader that is responsible for loading custom classes in this configurator.
 java.lang.Exception getException()
          Fetches the last exception thrown
 int getPeriodicity()
          Gets the periodicity of this configurator in minutes.
 void setClassLoader(java.lang.ClassLoader classLoader)
          Sets the class loader that is responsible for loading custom classes in this configurator.
 void setPeriodicity(int mins)
          Sets the periodicity of this configurator in minutes.
 void throwException()
          Rethrows the last exception thrown.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

configure

public abstract void configure()
Configures tracing and logging according to the settings of the configurator.

getClassLoader

public java.lang.ClassLoader getClassLoader()
Gets the class loader that is responsible for loading custom classes in this configurator.
Returns:
Class loader used for loading custom classes
See Also:
setClassLoader(java.lang.ClassLoader)

setClassLoader

public void setClassLoader(java.lang.ClassLoader classLoader)
Sets the class loader that is responsible for loading custom classes in this configurator. Custom classes are explicit implementations of Logging API interfaces or classes provided in the application. A typical example is a class implementing the interface Filter.
Parameters:
classLoader - Class loader used for loading custom classes
See Also:
getClassLoader()

getPeriodicity

public int getPeriodicity()
Gets the periodicity of this configurator in minutes. A periodicity of 0 means that the configurator is not called automatically.
Returns:
Periodicity of configurator in minutes

setPeriodicity

public void setPeriodicity(int mins)
Sets the periodicity of this configurator in minutes. This means that configure() will be automatically called every mins. Setting the periodicity to 0 turns off that automatic call.
Parameters:
mins - Periodicity of configurator in minutes

getException

public java.lang.Exception getException()
Fetches the last exception thrown
Returns:
Last exception thrown
See Also:
throwException()

throwException

public void throwException()
                    throws java.lang.Exception
Rethrows the last exception thrown. This method is useful if an exception is supposed to be dealt with according to a hierarchy of handlers already declared in a context.
Throws:
java.lang.Exception - Last exception thrown
See Also:
getException()