Top Description Fields Constructors Methods
javax.faces.context

public abstract Class ExceptionHandlerFactory

extends Object
implements FacesWrapper<ExceptionHandlerFactory>
Class Inheritance
All Implemented Interfaces
javax.faces.FacesWrapper
Known Direct Subclasses
javax.faces.webapp.PreJsf2ExceptionHandlerFactory
Imports
javax.faces.FacesWrapper

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 JavaServer 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

Field Summary

Modifier and TypeField and Description
private ExceptionHandlerFactory

Constructor Summary

AccessConstructor and Description
public
ExceptionHandlerFactory()

Deprecated Use the other constructor taking the implementation being wrapped.
public
ExceptionHandlerFactory(ExceptionHandlerFactory
The implementation being wrapped.
wrapped
)

If this factory has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor.

Method Summary

Modifier and TypeMethod and Description
public abstract ExceptionHandler

Returns:

newly created ExceptionHandler.
getExceptionHandler
()

Create and return a A new ExceptionHandler instance.

public ExceptionHandlerFactory
getWrapped()

Implements javax.faces.FacesWrapper.getWrapped.

If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

wrappedback to summary
private ExceptionHandlerFactory wrapped

Constructor Detail

ExceptionHandlerFactoryback to summary
public ExceptionHandlerFactory()

Deprecated

Use the other constructor taking the implementation being wrapped.

Annotations
@Deprecated
ExceptionHandlerFactoryback to summary
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:ExceptionHandlerFactory

The implementation being wrapped.

Method Detail

getExceptionHandlerback to summary
public abstract ExceptionHandler getExceptionHandler()

Create and return a A new ExceptionHandler instance. The implementation must return an ExceptionHandler instance suitable for the environment. For example, in some cases it may be desirable for an ExceptionHandler to write error information to the response instead of throwing exceptions as in the case of Ajax applications.

Returns:ExceptionHandler

newly created ExceptionHandler.

getWrappedback to summary
public ExceptionHandlerFactory getWrapped()

Implements javax.faces.FacesWrapper.getWrapped.

If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped.

Returns:ExceptionHandlerFactory

Doc from javax.faces.FacesWrapper.getWrapped.

the wrapped instance.

Annotations
@Override