public abstract class

Handler

extends Object
implements Configurable
java.lang.Object
   ↳ com.microstrategy.utils.log.Handler
Known Direct Subclasses
Known Indirect Subclasses

Summary

Protected Constructors
Handler()
Public Methods
abstract void close()
void configure(String propPrefix)
Requests the configurable object to configure itself.
abstract void flush()
String getEncoding()
Exception getException()
Filter getFilter()
Formatter getFormatter()
synchronized Level getLevel()
boolean isLoggable(LogRecord record)
abstract void publish(LogRecord record)
void setEncoding(String encoding)
void setFilter(Filter newFilter)
void setFormatter(Formatter newFormatter)
synchronized void setLevel(Level newLevel)
Protected Methods
String getEncodingSchemeSetting(String alias)
Filter getFilterSetting(String alias)
Formatter getFormatterSetting(String alias)
Level getLevelSetting(String alias)
String getStringSettingWithDefaultValue(String key, String defaultValue)
void setException(Exception exception)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.utils.log.Configurable

Protected Constructors

protected Handler ()

Public Methods

public abstract void close ()

public void configure (String propPrefix)

Requests the configurable object to configure itself. The "partial properties key" is a parameter of this method. It allows different pluggable logger components to configure themselves without knowing their parent. For example let's assume we have in the logger.properties file a handler named "fileH". Then for the handler itself the prefix will be the "fileH". For the formatter of this handler the prefix will be "fileH.formatter". For the filter of this handler the prefix will be "fileH.filter". And so on. Here is the simplified handler creation workflow:

  • A handler is created based on the corresponding class property ("fileH.class" in our example).
  • The handler's configure method is called with it's name as a prefix ("fileH" in our example).
  • Inside this method the handler reads it's configuration properties and configures itself. Among other things it creates child components. For example it will read the "fileH.filter" property, which defines the filter class name and will create corresponding object.
  • For each child component the handler will call it's configure method passing proper prefix. For example for the filter the prefix will be "fileH.filter".

Parameters
propPrefix String The partial properties key.

public abstract void flush ()

public String getEncoding ()

public Exception getException ()

public Filter getFilter ()

public Formatter getFormatter ()

public synchronized Level getLevel ()

public boolean isLoggable (LogRecord record)

public abstract void publish (LogRecord record)

public void setEncoding (String encoding)

public void setFilter (Filter newFilter)

public void setFormatter (Formatter newFormatter)

public synchronized void setLevel (Level newLevel)

Protected Methods

protected String getEncodingSchemeSetting (String alias)

protected Filter getFilterSetting (String alias)

protected Formatter getFormatterSetting (String alias)

protected Level getLevelSetting (String alias)

protected String getStringSettingWithDefaultValue (String key, String defaultValue)

protected void setException (Exception exception)