This ExceptionHandlerFactory instance
produces JSF 1.2 compatible
ExceptionHandler instances. The ExceptionHandler#handle
method of the ExceptionHandler produced by this factory must
meet the following requirements
Any exceptions thrown before or after phase execution will be logged and swallowed.
The implementation must examine
the Exception within each of the unhandled exception
events. If the Exception is an instance of
UpdateModelException, extract the FacesMessage from
the UpdateModelException. Log a SEVERE
message to the log and queue the FacesMessage
on the FacesContext, using the clientId of
the source component in a call to
FacesContext#addMessage(java.lang.String, javax.faces.application.FacesMessage)
| Modifier and Type | Class and Description |
|---|---|
| private static class | PreJsf2ExceptionHandlerFactory.PreJsf2ExceptionHandler
JSF 1.2-style |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ExceptionHandler | Returns: a newExceptionHandler that behaves in a fashion compatible
with specifications prior to JavaServerFaces 1.2Implements abstract javax. Create and return a A new
|
| PreJsf2ExceptionHandlerFactory | back to summary |
|---|---|
| public PreJsf2ExceptionHandlerFactory() | |
| getExceptionHandler | back to summary |
|---|---|
| public ExceptionHandler getExceptionHandler() Implements abstract javax. Doc from javax. Create and return a A new
| |
ExceptionHandler implementation.
| Modifier and Type | Field and Description |
|---|---|
| private ExceptionQueuedEvent | |
| private LinkedList | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final Logger | |
| private LinkedList |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ExceptionQueuedEvent | getHandledExceptionQueuedEvent()
Implements abstract javax. Return the first
|
| public Iterable | getHandledExceptionQueuedEvents()
Implements abstract javax. The default implementation must
return an |
| private String | |
| public Throwable | getRootCause(Throwable
passed-in wrapped t)Throwable.Implements abstract javax. Unwrap the argument |
| public Iterable | getUnhandledExceptionQueuedEvents()
Implements abstract javax. Return an |
| public void | handle()
Implements abstract javax. Take action to handle the
|
| public boolean | isListenerForSource(Object
the source that is inquiring about the
appropriateness of sending an event to this listener instance. source)Implements abstract javax. Implements javax. This method must return |
| private boolean | |
| private void | |
| public void | processEvent(SystemEvent
the event)SystemEvent instance that
is being processed.Implements abstract javax. Implements javax. When called, the listener can assume that any guarantees given
in the javadoc for the specific |
| private boolean | Returns: true if c is FacesException.class or
ELException.classThrowable implementation class
|
| handled | back to summary |
|---|---|
| private ExceptionQueuedEvent handled | |
| handledExceptions | back to summary |
|---|---|
| private LinkedList<ExceptionQueuedEvent> handledExceptions | |
| LOG_AFTER_KEY | back to summary |
|---|---|
| private static final String LOG_AFTER_KEY | |
| LOG_BEFORE_KEY | back to summary |
|---|---|
| private static final String LOG_BEFORE_KEY | |
| LOG_KEY | back to summary |
|---|---|
| private static final String LOG_KEY | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| unhandledExceptions | back to summary |
|---|---|
| private LinkedList<ExceptionQueuedEvent> unhandledExceptions | |
| PreJsf2ExceptionHandler | back to summary |
|---|---|
| private PreJsf2ExceptionHandler() | |
| getHandledExceptionQueuedEvent | back to summary |
|---|---|
| public ExceptionQueuedEvent getHandledExceptionQueuedEvent() Implements abstract javax. Doc from javax. Return the first
| |
| getHandledExceptionQueuedEvents | back to summary |
|---|---|
| public Iterable Implements abstract javax. Doc from javax. The default implementation must
return an
| |
| getLoggingKey | back to summary |
|---|---|
| private String getLoggingKey(boolean beforePhase, boolean afterPhase) | |
| getRootCause | back to summary |
|---|---|
| public Throwable getRootCause(Throwable t) Implements abstract javax. Doc from javax. Unwrap the argument
| |
| getUnhandledExceptionQueuedEvents | back to summary |
|---|---|
| public Iterable Implements abstract javax. Doc from javax. Return an
| |
| handle | back to summary |
|---|---|
| public void handle() throws FacesException Implements abstract javax. Doc from javax. Take action to handle the
| |
| isListenerForSource | back to summary |
|---|---|
| public boolean isListenerForSource(Object source) Implements abstract javax. Implements javax. Doc from javax. This method must return
| |
| isRethrown | back to summary |
|---|---|
| private boolean isRethrown(Throwable t, boolean isBeforeOrAfterPhase) | |
| log | back to summary |
|---|---|
| private void log(ExceptionQueuedEventContext exceptionContext) | |
| processEvent | back to summary |
|---|---|
| public void processEvent(SystemEvent event) throws AbortProcessingException Implements abstract javax. Implements javax. Doc from javax. When called, the listener can assume that any guarantees given
in the javadoc for the specific
| |
| shouldUnwrap | back to summary |
|---|---|
| private boolean shouldUnwrap(Class<? extends Throwable> c) | |