Package org.apache.myfaces.context
Class SwitchAjaxExceptionHandlerWrapperImpl
java.lang.Object
jakarta.faces.context.ExceptionHandler
jakarta.faces.context.ExceptionHandlerWrapper
org.apache.myfaces.context.SwitchAjaxExceptionHandlerWrapperImpl
- All Implemented Interfaces:
FacesListener,SystemEventListener,FacesWrapper<ExceptionHandler>,EventListener
This wrapper is a switch to choose in a lazy way between ajax and
normal exceptionHandler wrapping, because FacesContext is initialized after
ExceptionHandler, so it is not safe to get it when
ExceptionHandlerFactory.getExceptionHandler() is called.
-
Constructor Summary
ConstructorsConstructorDescriptionSwitchAjaxExceptionHandlerWrapperImpl(ExceptionHandler requestExceptionHandler, ExceptionHandler ajaxExceptionHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected booleanisAjaxRequest(FacesContext facesContext) protected booleanisAjaxRequest(SystemEvent exceptionQueuedEvent) voidprocessEvent(SystemEvent exceptionQueuedEvent) Methods inherited from class jakarta.faces.context.ExceptionHandlerWrapper
getHandledExceptionQueuedEvent, getHandledExceptionQueuedEvents, getRootCause, getUnhandledExceptionQueuedEvents, handle, isListenerForSource
-
Constructor Details
-
SwitchAjaxExceptionHandlerWrapperImpl
public SwitchAjaxExceptionHandlerWrapperImpl(ExceptionHandler requestExceptionHandler, ExceptionHandler ajaxExceptionHandler)
-
-
Method Details
-
processEvent
- Specified by:
processEventin interfaceSystemEventListener- Overrides:
processEventin classExceptionHandlerWrapper- Throws:
AbortProcessingException
-
isAjaxRequest
-
isAjaxRequest
-
isAjaxRequest
protected boolean isAjaxRequest() -
getWrapped
- Specified by:
getWrappedin interfaceFacesWrapper<ExceptionHandler>- Overrides:
getWrappedin classExceptionHandlerWrapper
-