Class 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 Detail

      • Handler

        public Handler()
    • Method Detail

      • close

        public abstract void close()
                            throws SecurityException
        Close 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.