Package java.util.logging
Class Handler
- java.lang.Object
-
- java.util.logging.Handler
-
- Direct Known Subclasses:
DefaultHandler
public abstract class Handler extends Object
A handler is an entity that publishes messages.It may simply write messages to the standard output or a file, send it through a network, etc.
-
-
Constructor Summary
Constructors Constructor Description Handler()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidclose()Close the handler and the associated resources (such as streams, connections, files).abstract voidflush()Flush any buffered output.abstract voidpublish(LogRecord record)Publish a LogRecord.
-
-
-
Method Detail
-
close
public abstract void close() throws SecurityExceptionClose the handler and the associated resources (such as streams, connections, files).NOTE: this method is not called by the framework.
- Throws:
SecurityException- if a security manager exits and if the caller does not have the appropriate permissions.
-
flush
public abstract void flush()
Flush any buffered output.NOTE: this method is not called by the framework.
-
publish
public abstract void publish(LogRecord record)
Publish a LogRecord. The logging request was made initially to a logger, which forwarded the LogRecord to the handler if the logger's level was compatible.- Parameters:
record- the LogRecord to publish.
-
-