org.objectweb.util.monolog.wrapper.config

Class BasicHandler

Implemented Interfaces:
Handler, Serializable

public class BasicHandler
extends java.lang.Object
implements Handler, Serializable

This class is a basic implementation the Handler interface. It is not linked to any underlying log system. Therefore all attributes are stored into internal struture.

Author:
Sebastien Chassande-Barrioz

Field Summary

protected HashMap
attributes
The attributes of the handler are listed by this field.
protected String
name
The name of the handler
protected String
type
The type of the handler

Fields inherited from interface org.objectweb.util.monolog.api.Handler

APPEND_MODE_ATTRIBUTE, BUFFER_ATTRIBUTE, CONSOLE_HANDLER_TYPE, FILE_HANDLER_TYPE, FILE_NUMBER_ATTRIBUTE, GENERIC_HANDLER_TYPE, LEVEL_ATTRIBUTE, LOGGER_HANDLER_TYPE, MAX_SIZE_ATTRIBUTE, OUTPUT_ATTRIBUTE, PATTERN_ATTRIBUTE, ROLLING_FILE_HANDLER_TYPE

Constructor Summary

BasicHandler(String n, String t)

Method Summary

Object
getAttribute(String key)
String[]
getAttributeNames()
Map
getAttributes()
String
getName()
String
getType()
Object
setAttribute(String key, Object value)
void
setAttributes(Map properties)
void
setName(String n)

Field Details

attributes

protected HashMap attributes
The attributes of the handler are listed by this field. key = atribute name value = attribute value


name

protected String name
The name of the handler


type

protected String type
The type of the handler

Constructor Details

BasicHandler

public BasicHandler(String n,
                    String t)

Method Details

getAttribute

public Object getAttribute(String key)
Specified by:
getAttribute in interface Handler


getAttributeNames

public String[] getAttributeNames()
Specified by:
getAttributeNames in interface Handler


getAttributes

public Map getAttributes()


getName

public String getName()
Specified by:
getName in interface Handler


getType

public String getType()
Specified by:
getType in interface Handler


setAttribute

public Object setAttribute(String key,
                           Object value)
Specified by:
setAttribute in interface Handler


setAttributes

public void setAttributes(Map properties)


setName

public void setName(String n)
Specified by:
setName in interface Handler