private static final class PreJsf2ExceptionHandlerFactory.PreJsf2ExceptionHandler extends ExceptionHandler
ExceptionHandler
implementation.Modifier and Type | Field and Description |
---|---|
private ExceptionQueuedEvent |
handled |
private java.util.LinkedList<ExceptionQueuedEvent> |
handledExceptions |
private static java.lang.String |
LOG_AFTER_KEY |
private static java.lang.String |
LOG_BEFORE_KEY |
private static java.lang.String |
LOG_KEY |
private static java.util.logging.Logger |
LOGGER |
private java.util.LinkedList<ExceptionQueuedEvent> |
unhandledExceptions |
Modifier | Constructor and Description |
---|---|
private |
PreJsf2ExceptionHandler() |
Modifier and Type | Method and Description |
---|---|
ExceptionQueuedEvent |
getHandledExceptionQueuedEvent()
Return the first
|
java.lang.Iterable<ExceptionQueuedEvent> |
getHandledExceptionQueuedEvents()
The default implementation must
return an |
private java.lang.String |
getLoggingKey(boolean beforePhase,
boolean afterPhase) |
java.lang.Throwable |
getRootCause(java.lang.Throwable t)
Unwrap the argument |
java.lang.Iterable<ExceptionQueuedEvent> |
getUnhandledExceptionQueuedEvents()
Return an |
void |
handle()
Take action to handle the
|
boolean |
isListenerForSource(java.lang.Object source)
This method must return
true if and only if this
listener instance is interested in receiving events from the
instance referenced by the source parameter. |
private boolean |
isRethrown(java.lang.Throwable t,
boolean isBeforeOrAfterPhase) |
private void |
log(ExceptionQueuedEventContext exceptionContext) |
void |
processEvent(SystemEvent event)
When called, the listener can assume that any guarantees given
in the javadoc for the specific
SystemEvent
subclass are true. |
private boolean |
shouldUnwrap(java.lang.Class<? extends java.lang.Throwable> c) |
private static final java.util.logging.Logger LOGGER
private static final java.lang.String LOG_BEFORE_KEY
private static final java.lang.String LOG_AFTER_KEY
private static final java.lang.String LOG_KEY
private java.util.LinkedList<ExceptionQueuedEvent> unhandledExceptions
private java.util.LinkedList<ExceptionQueuedEvent> handledExceptions
private ExceptionQueuedEvent handled
public ExceptionQueuedEvent getHandledExceptionQueuedEvent()
ExceptionHandler
Return the first
ExceptionQueuedEvent
handled by this handler.
getHandledExceptionQueuedEvent
in class ExceptionHandler
ExceptionHandler@getHandledExceptionQueuedEvent()
public void handle() throws FacesException
ExceptionHandler
Take action to handle the
Exception
instances residing inside the ExceptionQueuedEvent
instances that have been queued by calls to
Application().publishEvent(ExceptionQueuedEvent.class,
eventContext)
. The requirements of the default
implementation are detailed in section JSF.6.2.1.
handle
in class ExceptionHandler
FacesException
- if and only if a problem occurs while
performing the algorithm to handle the Exception
, not
as a means of conveying a handled Exception
itself.public boolean isListenerForSource(java.lang.Object source)
ExceptionHandler
This method must return true
if and only if this
listener instance is interested in receiving events from the
instance referenced by the source
parameter.
isListenerForSource
in interface SystemEventListener
isListenerForSource
in class ExceptionHandler
source
- the source that is inquiring about the
appropriateness of sending an event to this listener instance.ExceptionHandler.isListenerForSource(Object)
public void processEvent(SystemEvent event) throws AbortProcessingException
ExceptionHandler
When called, the listener can assume that any guarantees given
in the javadoc for the specific SystemEvent
subclass are true.
processEvent
in interface SystemEventListener
processEvent
in class ExceptionHandler
event
- the SystemEvent
instance that
is being processed.AbortProcessingException
- if lifecycle processing should
cease for this request.ExceptionHandler.processEvent(javax.faces.event.SystemEvent)
public java.lang.Throwable getRootCause(java.lang.Throwable t)
ExceptionHandler
Unwrap the argument t
until the unwrapping encounters an Object whose
getClass()
is not equal to
FacesException.class
or
javax.el.ELException.class
. If there is no root cause, null
is returned.
getRootCause
in class ExceptionHandler
ExceptionHandler.getRootCause(Throwable)
public java.lang.Iterable<ExceptionQueuedEvent> getUnhandledExceptionQueuedEvents()
ExceptionHandler
Return an Iterable
over
all ExceptionQueuedEvent
s that have not yet been handled
by the ExceptionHandler.handle()
method.
getUnhandledExceptionQueuedEvents
in class ExceptionHandler
ExceptionHandler.getUnhandledExceptionQueuedEvents()
public java.lang.Iterable<ExceptionQueuedEvent> getHandledExceptionQueuedEvents()
ExceptionHandler
The default implementation must
return an Iterable
over all
ExceptionQueuedEvent
s that have been handled by the ExceptionHandler.handle()
method.
getHandledExceptionQueuedEvents
in class ExceptionHandler
ExceptionHandler.getHandledExceptionQueuedEvents()
private boolean shouldUnwrap(java.lang.Class<? extends java.lang.Throwable> c)
c
- Throwable
implementation classtrue
if c
is FacesException.class or
ELException.classprivate boolean isRethrown(java.lang.Throwable t, boolean isBeforeOrAfterPhase)
private void log(ExceptionQueuedEventContext exceptionContext)
private java.lang.String getLoggingKey(boolean beforePhase, boolean afterPhase)