org.inspektr.error.support
Class DefaultErrorLogManager

java.lang.Object
  extended by org.inspektr.error.support.DefaultErrorLogManager
All Implemented Interfaces:
ErrorLogManager

public class DefaultErrorLogManager
extends java.lang.Object
implements ErrorLogManager

An ErrorLogManager implementation.

Since:
1.0
Version:
$Revision: 1.2 $ $Date: 2007/07/11 20:48:47 $
Author:
lleung

Constructor Summary
DefaultErrorLogManager(java.lang.String applicationCode, java.util.List<ErrorReporter> errorReporters)
          Constructs a new DefaultErrorLogManager.
 
Method Summary
 java.util.List<ErrorReporter> getErrorReporters()
          Returns the list of ErrorReporter associated with this manager.
 void recordError(java.lang.String errorDescription)
          Records the specified error.
 void recordError(java.lang.Throwable throwable)
          Records the specified throwable.
 void setCurrentContextPrincipalResolver(CurrentContextPrincipalResolver resolver)
          Sets the currentContextPrincipalResolver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultErrorLogManager

public DefaultErrorLogManager(java.lang.String applicationCode,
                              java.util.List<ErrorReporter> errorReporters)
Constructs a new DefaultErrorLogManager.

Parameters:
applicationCode - The application identifier to use when reporting errors.
errorReporters - A list of ErrorReporters to use for reporting errors.
Method Detail

setCurrentContextPrincipalResolver

public void setCurrentContextPrincipalResolver(CurrentContextPrincipalResolver resolver)
Sets the currentContextPrincipalResolver. The resolver will be used to resolve current context information on the principal.

Parameters:
resolver - the CurrentContextPrincipalResolver to use.

recordError

public void recordError(java.lang.String errorDescription)
Description copied from interface: ErrorLogManager
Records the specified error.

Specified by:
recordError in interface ErrorLogManager
Parameters:
errorDescription - The error description.

recordError

public void recordError(java.lang.Throwable throwable)
Description copied from interface: ErrorLogManager
Records the specified throwable.

Specified by:
recordError in interface ErrorLogManager
Parameters:
throwable - The throwable describing the error.

getErrorReporters

public java.util.List<ErrorReporter> getErrorReporters()
Description copied from interface: ErrorLogManager
Returns the list of ErrorReporter associated with this manager.

Specified by:
getErrorReporters in interface ErrorLogManager
Returns:
list of ErrorReporters.


Copyright © 2007-2009. All Rights Reserved.