org.x4juli.global.spi
Interface ExtendedHandler

All Superinterfaces:
Handler
All Known Implementing Classes:
AbstractHandler

public interface ExtendedHandler
extends Handler

Specifies operations for any x4juli handler.

Since:
0.5
Author:
Boris Unckel

Method Summary
 void addFilter(ExtendedFilter newFilter)
          Add a filter to end of the filter list.
 void clearFilters()
          Clear the filters chain.
 void close()
           
 void flush()
           
 java.lang.String getEncoding()
           
 java.util.logging.ErrorManager getErrorManager()
           
 java.util.logging.Filter getFilter()
           
 java.util.logging.Formatter getFormatter()
           
 java.lang.String getFullQualifiedClassName()
          Determine performant the FullQualifiedClassName.
 java.util.logging.Level getLevel()
           
 java.lang.String getName()
          Retrieve name of the Handler.
 boolean isActive()
          Returns true if this appender is working order.
 boolean isClosed()
          Returns true if this appender instance is closed.
 boolean isLoggable(ExtendedLogRecord record)
          Checks whether a record should be logged or not.
 boolean isLoggable(java.util.logging.LogRecord record)
           
 void publish(ExtendedLogRecord record)
           
 void publish(java.util.logging.LogRecord record)
           
 void setEncoding(java.lang.String encoding)
           
 void setErrorManager(java.util.logging.ErrorManager em)
           
 void setFilter(java.util.logging.Filter newFilter)
           
 void setFormatter(java.util.logging.Formatter newFormatter)
           
 void setLevel(java.util.logging.Level newLevel)
           
 void setName(java.lang.String name)
          Set the name of this Appender.
 

Method Detail

getFullQualifiedClassName

public java.lang.String getFullQualifiedClassName()
Determine performant the FullQualifiedClassName. Subclasses should overwrite this method. Dynamic determination is not recommended.

Returns:
the FQCN
Since:
0.5

publish

public void publish(ExtendedLogRecord record)
Parameters:
record - to check and write in the log.
Since:
0.5
See Also:
AbstractHandler.publish(LogRecord)

isLoggable

public boolean isLoggable(ExtendedLogRecord record)
Checks whether a record should be logged or not. Criteria: not null, level, filter chain passed.

Parameters:
record - the record to check.
Returns:
true if record fullfills criteria.
Since:
0.5

addFilter

public void addFilter(ExtendedFilter newFilter)
Add a filter to end of the filter list.

Parameters:
newFilter - the filter to add
Since:
0.5

clearFilters

public void clearFilters()
Clear the filters chain.

Since:
0.5

isClosed

public boolean isClosed()
Returns true if this appender instance is closed.

Since:
0.5

isActive

public boolean isActive()
Returns true if this appender is working order.

Since:
0.5

setName

public void setName(java.lang.String name)
Set the name of this Appender.

Since:
0.5

getName

public java.lang.String getName()
Retrieve name of the Handler.

Returns:
the name of the Handler.

publish

public void publish(java.util.logging.LogRecord record)
Since:
0.5
See Also:
Handler.publish(java.util.logging.LogRecord)

flush

public void flush()
Since:
0.5
See Also:
Handler.flush()

close

public void close()
           throws java.lang.SecurityException
Throws:
java.lang.SecurityException
Since:
0.5
See Also:
Handler.close()

setFormatter

public void setFormatter(java.util.logging.Formatter newFormatter)
                  throws java.lang.SecurityException
Throws:
java.lang.SecurityException
Since:
0.5
See Also:
Handler.setFormatter(java.util.logging.Formatter)

getFormatter

public java.util.logging.Formatter getFormatter()
Since:
0.5
See Also:
Handler.getFormatter()

setEncoding

public void setEncoding(java.lang.String encoding)
                 throws java.lang.SecurityException,
                        java.io.UnsupportedEncodingException
Throws:
java.lang.SecurityException
java.io.UnsupportedEncodingException
Since:
0.5
See Also:
Handler.setEncoding(java.lang.String)

getEncoding

public java.lang.String getEncoding()
Since:
0.5
See Also:
Handler.getEncoding()

setFilter

public void setFilter(java.util.logging.Filter newFilter)
               throws java.lang.SecurityException
Throws:
java.lang.SecurityException
Since:
0.5
See Also:
Handler.setFilter(java.util.logging.Filter)

getFilter

public java.util.logging.Filter getFilter()
Since:
0.5
See Also:
Handler.getFilter()

setErrorManager

public void setErrorManager(java.util.logging.ErrorManager em)
Since:
0.5
See Also:
Handler.setErrorManager(java.util.logging.ErrorManager)

getErrorManager

public java.util.logging.ErrorManager getErrorManager()
Since:
0.5
See Also:
Handler.getErrorManager()

setLevel

public void setLevel(java.util.logging.Level newLevel)
              throws java.lang.SecurityException
Throws:
java.lang.SecurityException
Since:
0.5
See Also:
Handler.setLevel(java.util.logging.Level)

getLevel

public java.util.logging.Level getLevel()
Since:
0.5
See Also:
Handler.getLevel()

isLoggable

public boolean isLoggable(java.util.logging.LogRecord record)
Since:
0.5
See Also:
Handler.isLoggable(java.util.logging.LogRecord)


${license_html}