imx.loggui.handler
Class SerializableHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by imx.loggui.handler.SerializableHandler
All Implemented Interfaces:
NameInterface, java.io.Serializable
Direct Known Subclasses:
ConfigurableFileHandler, DefaultStreamHandler

public abstract class SerializableHandler
extends java.util.logging.Handler
implements java.io.Serializable, NameInterface

This class makes Handler serializable. In addition it ensures that the formatter property is never null. Its default is now SimpleFormatter.getSingleton().
If some of the handler properties (formatter, level, filter) point to not serializable objects, they will be serialized with a null value.
This class also implements the NameInterface, so that all handlers have a name, that can be edited.

See Also:
Serialized Form

Constructor Summary
SerializableHandler()
           
 
Method Summary
 java.lang.String getName()
           
 void setFormatter(java.util.logging.Formatter formatter)
          If formatter is null, this method has no effect.
 void setLevel(java.util.logging.Level level)
          If level is null, this method has no effect.
 void setName(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class java.util.logging.Handler
close, flush, getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, publish, setEncoding, setErrorManager, setFilter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SerializableHandler

public SerializableHandler()
Method Detail

setFormatter

public void setFormatter(java.util.logging.Formatter formatter)
If formatter is null, this method has no effect.

Overrides:
setFormatter in class java.util.logging.Handler

setLevel

public void setLevel(java.util.logging.Level level)
If level is null, this method has no effect.

Overrides:
setLevel in class java.util.logging.Handler

setName

public void setName(java.lang.String name)
Specified by:
setName in interface NameInterface

getName

public java.lang.String getName()
Specified by:
getName in interface NameInterface

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object