Package org.apache.myfaces.context
Class SwitchAjaxExceptionHandlerWrapperImpl
- java.lang.Object
-
- javax.faces.context.ExceptionHandler
-
- javax.faces.context.ExceptionHandlerWrapper
-
- org.apache.myfaces.context.SwitchAjaxExceptionHandlerWrapperImpl
-
- All Implemented Interfaces:
EventListener,FacesListener,SystemEventListener,FacesWrapper<ExceptionHandler>
public class SwitchAjaxExceptionHandlerWrapperImpl extends ExceptionHandlerWrapper
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
Constructors Constructor Description SwitchAjaxExceptionHandlerWrapperImpl(ExceptionHandler requestExceptionHandler, ExceptionHandler ajaxExceptionHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExceptionHandlergetWrapped()protected booleanisAjaxRequest()protected booleanisAjaxRequest(FacesContext facesContext)protected booleanisAjaxRequest(SystemEvent exceptionQueuedEvent)voidprocessEvent(SystemEvent exceptionQueuedEvent)-
Methods inherited from class javax.faces.context.ExceptionHandlerWrapper
getHandledExceptionQueuedEvent, getHandledExceptionQueuedEvents, getRootCause, getUnhandledExceptionQueuedEvents, handle, isListenerForSource
-
-
-
-
Constructor Detail
-
SwitchAjaxExceptionHandlerWrapperImpl
public SwitchAjaxExceptionHandlerWrapperImpl(ExceptionHandler requestExceptionHandler, ExceptionHandler ajaxExceptionHandler)
-
-
Method Detail
-
processEvent
public void processEvent(SystemEvent exceptionQueuedEvent) throws AbortProcessingException
- Specified by:
processEventin interfaceSystemEventListener- Overrides:
processEventin classExceptionHandlerWrapper- Throws:
AbortProcessingException
-
isAjaxRequest
protected boolean isAjaxRequest(SystemEvent exceptionQueuedEvent)
-
isAjaxRequest
protected boolean isAjaxRequest(FacesContext facesContext)
-
isAjaxRequest
protected boolean isAjaxRequest()
-
getWrapped
public ExceptionHandler getWrapped()
- Specified by:
getWrappedin interfaceFacesWrapper<ExceptionHandler>- Overrides:
getWrappedin classExceptionHandlerWrapper
-
-