Class RemoteHandler


  • public class RemoteHandler
    extends Handler
    The class which publishes the log message to a remote log service. Also does buffering of LogRecords upto the number specified in the log configuration. This buffer is emptied when the number of log records in the buffer reaches the specified number or when the specified time interval is exceeded.
    • Constructor Detail

      • RemoteHandler

        public RemoteHandler​(String dummyParam)
        Constructor in which the configuration of the handler is done.
        Parameters:
        dummyParam - dummy parameter. To make instantation generic for all handlers.
    • Method Detail

      • publish

        public void publish​(LogRecord logRecord)
        This method sends the LogRecord to the remote logging service.
        Specified by:
        publish in class Handler
        Parameters:
        logRecord - The LogRecord to be published to the remote logging service.
      • close

        public void close()
        Flushes any buffered output by calling flush(), and then close the handler and free all associated resources with this handler.
        Specified by:
        close in class Handler
      • flush

        public void flush()
        Flush any buffered output.
        Specified by:
        flush in class Handler
      • nonBlockingFlush

        public void nonBlockingFlush()
        Copy the existing request set map and pass it on to ThreadPool as part of a FlushTask. Initiatize a new map as the new request set map for future remote logging calls.