Interface ErrorHandlerFactory<A extends Action>

All Known Implementing Classes:
LoggingErrorHandlerFactory, RethrowErrorHandlerFactory

public interface ErrorHandlerFactory<A extends Action>
Error handler factories are responsible for creating error handlers. Each extension point may provide a specific factory implementation (see ExtensionPoint.getErrorHandlerFactory()). If no factory is given, a default error handler will be used by the system (eg. LoggingErrorHandlerFactory). The error handler factory must be thread-safe since it can be used by many threads at the same time.
Since:
2.17
Author:
Nicklas
Last modified
$Date: 2010-11-12 14:59:38 +0100 (fr, 12 nov 2010) $
  • Method Details

    • getErrorHandler

      ErrorHandler<A> getErrorHandler​(InvokationContext<? extends A> context)
      Get an error handler for the current context. This method is called once for each request/use of an extension point. Errors that happen when processing things related to this extension point will be directed to the error handler returned by this method. The factory may create a new or it may re-use the same error handler for each request. If the error handler is re-used it must be thread-safe.
      Parameters:
      context - The current invokation context which is an extension point context (the InvokationContext.getExtension() method is expected to return null)