org.opends.server.loggers
Class LogPublisherErrorHandler

java.lang.Object
  extended by org.opends.server.loggers.LogPublisherErrorHandler

public class LogPublisherErrorHandler
extends java.lang.Object

A LogPublisherErrorHandler is used for notification of exceptions which occur during the publishing of a record. The advantage of using a handler is that we can handle exceptions asynchronously (useful when dealing with an AsynchronousPublisher).


Constructor Summary
LogPublisherErrorHandler(DN publisherConfigDN)
          Construct a new log publisher error handler for a log publisher with the provided configuration DN.
 
Method Summary
 void handleCloseError(java.lang.Throwable ex)
          Handle an exception which occurred while trying to close a log file.
 void handleDeleteError(RetentionPolicy retentionPolicy, java.lang.Throwable ex)
          Handle an exception which occured while trying to list log files in a directory.
 void handleFlushError(java.lang.Throwable ex)
          Handle an exception which occurred while trying to flush the writer buffer.
 void handleOpenError(java.io.File file, java.lang.Throwable ex)
          Handle an exception which occurred while trying to open a log file.
 void handleWriteError(java.lang.String record, java.lang.Throwable ex)
          Handle an exception which occurred during the publishing of a log record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogPublisherErrorHandler

public LogPublisherErrorHandler(DN publisherConfigDN)
Construct a new log publisher error handler for a log publisher with the provided configuration DN.

Parameters:
publisherConfigDN - The DN of the managed object for the log publisher.
Method Detail

handleWriteError

public void handleWriteError(java.lang.String record,
                             java.lang.Throwable ex)
Handle an exception which occurred during the publishing of a log record.

Parameters:
record - - the record which was being published.
ex - - the exception occurred.

handleOpenError

public void handleOpenError(java.io.File file,
                            java.lang.Throwable ex)
Handle an exception which occurred while trying to open a log file.

Parameters:
file - - the file which was being opened.
ex - - the exception occurred.

handleCloseError

public void handleCloseError(java.lang.Throwable ex)
Handle an exception which occurred while trying to close a log file.

Parameters:
ex - - the exception occurred.

handleFlushError

public void handleFlushError(java.lang.Throwable ex)
Handle an exception which occurred while trying to flush the writer buffer.

Parameters:
ex - - the exception occurred.

handleDeleteError

public void handleDeleteError(RetentionPolicy retentionPolicy,
                              java.lang.Throwable ex)
Handle an exception which occured while trying to list log files in a directory.

Parameters:
retentionPolicy - - the retention policy being enforced when the exception occured.
ex - - the exception occurred.