Class ExceptionHandlerFactory
- java.lang.Object
-
- jakarta.faces.context.ExceptionHandlerFactory
-
- All Implemented Interfaces:
FacesWrapper<ExceptionHandlerFactory>
public abstract class ExceptionHandlerFactory extends Object implements FacesWrapper<ExceptionHandlerFactory>
ExceptionHandlerFactory is a factory object that creates (if needed) and returns a new
ExceptionHandler
instance.There must be one
ExceptionHandlerFactory
instance per web application that is utilizing Jakarta Server Faces. This instance can be acquired, in a portable manner, by calling:ExceptionHandlerFactory factory = (ExceptionHandlerFactory) FactoryFinder.getFactory(FactoryFinder.EXCEPTION_HANDLER_FACTORY);
Usage: extend this class and push the implementation being wrapped to the constructor and use
getWrapped()
to access the instance being wrapped.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description ExceptionHandlerFactory()
Deprecated.Use the other constructor taking the implementation being wrapped.ExceptionHandlerFactory(ExceptionHandlerFactory wrapped)
If this factory has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ExceptionHandler
getExceptionHandler()
Create and return a A newExceptionHandler
instance.ExceptionHandlerFactory
getWrapped()
If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped.
-
-
-
Constructor Detail
-
ExceptionHandlerFactory
@Deprecated public ExceptionHandlerFactory()
Deprecated.Use the other constructor taking the implementation being wrapped.
-
ExceptionHandlerFactory
public ExceptionHandlerFactory(ExceptionHandlerFactory wrapped)
If this factory has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. The
getWrapped()
will then return the implementation being wrapped.- Parameters:
wrapped
- The implementation being wrapped.
-
-
Method Detail
-
getWrapped
public ExceptionHandlerFactory getWrapped()
If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped.
- Specified by:
getWrapped
in interfaceFacesWrapper<ExceptionHandlerFactory>
- Returns:
- the wrapped instance.
-
getExceptionHandler
public abstract ExceptionHandler getExceptionHandler()
Create and return a A new
ExceptionHandler
instance. The implementation must return anExceptionHandler
instance suitable for the environment. For example, in some cases it may be desirable for anExceptionHandler
to write error information to the response instead of throwing exceptions as in the case of Ajax applications.- Returns:
- newly created
ExceptionHandler
.
-
-