|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.logging.Handler
org.objectweb.util.monolog.wrapper.javaLog.GenericHandler
public class GenericHandler
Is a generic handler implementation used to wrapper java.util.logging.Handler instance.
| Field Summary | |
|---|---|
Handler |
handler
The real handler |
protected String |
name
The name of the handler |
protected String |
type
the type of the handler (see org.objectweb.util.monolog.api.Handler for the possible values) |
| 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, JMX_HANDLER_TYPE, LEVEL_ATTRIBUTE, LOGGER_HANDLER_TYPE, MAX_SIZE_ATTRIBUTE, OUTPUT_ATTRIBUTE, PATTERN_ATTRIBUTE, ROLLING_FILE_HANDLER_TYPE |
| Constructor Summary | |
|---|---|
GenericHandler()
|
|
GenericHandler(String name)
|
|
GenericHandler(String name,
Handler h)
builds a generic handler since a real handler. |
|
GenericHandler(String name,
String type)
Builds a generic handler with its name and the type. |
|
| Method Summary | |
|---|---|
void |
close()
Close the Handler and free all associated resources. |
void |
flush()
Flush any buffered output. |
Object |
getAttribute(String n)
It retrieves the value of an attribute value of the handler. |
String[] |
getAttributeNames()
It retrieves the attributes of the handler |
String |
getEncoding()
Return the character encoding for this Handler. |
Filter |
getFilter()
Get the current Filter for this Handler. |
Formatter |
getFormatter()
Return the Formatter for this Handler. |
Level |
getLevel()
Get the log level specifying which messages will be logged by this Handler. |
String |
getName()
It retrieves the name of the handler |
String |
getType()
It retrieves the Handler type |
boolean |
isLoggable(LogRecord record)
Check if this Handler would actually log a given LogRecord. |
void |
publish(LogRecord record)
Publish a LogRecord. |
Object |
setAttribute(String _name,
Object value)
It assigns an attributte to the handler. |
void |
setEncoding(String encoding)
Set the character encoding used by this Handler. |
protected void |
setException(Exception exception)
Set the most recent IO exception. |
void |
setFilter(Filter newFilter)
Set a Filter to control output on this Handler. |
void |
setFormatter(Formatter newFormatter)
Set a Formatter. |
void |
setLevel(Level newLevel)
Set the log level specifying which message levels will be logged by this Handler. |
void |
setName(String name)
It assigns the name of the handler |
| Methods inherited from class java.util.logging.Handler |
|---|
getErrorManager, reportError, setErrorManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Handler handler
protected String type
protected String name
| Constructor Detail |
|---|
public GenericHandler()
public GenericHandler(String name)
public GenericHandler(String name,
String type)
name - is the name of the handlertype - is the type of the handler
public GenericHandler(String name,
Handler h)
name - is the name of the handlerh - is the real handler| Method Detail |
|---|
public String getName()
getName in interface Handlerpublic void setName(String name)
setName in interface Handlerpublic String getType()
getType in interface Handlerpublic String[] getAttributeNames()
getAttributeNames in interface Handlerpublic Object getAttribute(String n)
getAttribute in interface Handlername - is an attribute name
public Object setAttribute(String _name,
Object value)
setAttribute in interface Handler_name - is the attribute namevalue - is the attribute value
public void close()
close in class Handlerpublic void flush()
flush in class Handlerpublic String getEncoding()
getEncoding in class Handlerpublic Filter getFilter()
getFilter in class Handlerpublic Formatter getFormatter()
getFormatter in class Handlerpublic Level getLevel()
getLevel in class Handlerpublic boolean isLoggable(LogRecord record)
isLoggable in class Handlerpublic void publish(LogRecord record)
publish in class Handler
public void setEncoding(String encoding)
throws SecurityException,
UnsupportedEncodingException
setEncoding in class HandlerSecurityException
UnsupportedEncodingExceptionprotected void setException(Exception exception)
public void setFilter(Filter newFilter)
setFilter in class Handlerpublic void setFormatter(Formatter newFormatter)
setFormatter in class Handlerpublic void setLevel(Level newLevel)
setLevel in class Handler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||