de.smartics.exceptions.context
Class AbstractExceptionContext

Package class diagram package AbstractExceptionContext
java.lang.Object
  extended by de.smartics.exceptions.context.AbstractExceptionContext
All Implemented Interfaces:
ExceptionContext
Direct Known Subclasses:
AbstractI18nExceptionContext, ConfiguredExceptionContext, PropertiesConfiguredExceptionContext, SystemDefaultExceptionContext

public abstract class AbstractExceptionContext
     
     
extends Object
implements ExceptionContext

Provides exception relevant information for an exception context as an abstract class. There is one context for each class loader that is stored by the ExceptionContextManager.


Field Summary
protected  CodeMessageFormatter formatter
          Formatter for instances of CoreException.
protected  IdFactory idFactory
          The factory for generating identifiers.
protected  ThrowableHandleMode throwableHandleMode
          The configuration to control the handling of throwables.
 
Constructor Summary
protected AbstractExceptionContext(org.apache.commons.configuration.Configuration configuration)
          Default constructor providing a configuration.
protected AbstractExceptionContext(InputStream in)
          Convenience constructor providing an input stream.
protected AbstractExceptionContext(Reader reader)
          Convenience constructor providing a reader.
protected AbstractExceptionContext(URL url)
          Convenience constructor providing an URL.
 
Method Summary
 CodeMessageFormatter getCodeMessageFormatter()
          Returns the formatter for code messages.
 IdFactory getIdFactory()
          Returns the factory for generating identifiers.
 ThrowableHandleMode getThrowableHandleMode()
          Returns the configuration to control the handling of throwables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idFactory

protected final IdFactory idFactory
The factory for generating identifiers.


throwableHandleMode

protected final ThrowableHandleMode throwableHandleMode
The configuration to control the handling of throwables.


formatter

protected final CodeMessageFormatter formatter
Formatter for instances of CoreException.

Constructor Detail

AbstractExceptionContext

protected AbstractExceptionContext(org.apache.commons.configuration.Configuration configuration)
                            throws IllegalArgumentException
Default constructor providing a configuration.

Parameters:
configuration - the parameters to configure this context.
Throws:
IllegalArgumentException - if any configuration parameter value is illegal.

AbstractExceptionContext

protected AbstractExceptionContext(InputStream in)
                            throws IllegalArgumentException
Convenience constructor providing an input stream.

Parameters:
in - the stream to read the configuration from.
Throws:
IllegalArgumentException - if any configuration parameter value is illegal.

AbstractExceptionContext

protected AbstractExceptionContext(Reader reader)
                            throws IllegalArgumentException
Convenience constructor providing a reader.

Parameters:
reader - the reader to read the configuration from.
Throws:
IllegalArgumentException - if any configuration parameter value is illegal.

AbstractExceptionContext

protected AbstractExceptionContext(URL url)
                            throws IllegalArgumentException
Convenience constructor providing an URL.

Parameters:
url - the URL pointing to the configuration to read.
Throws:
IllegalArgumentException - if any configuration parameter value is illegal.
Method Detail

getIdFactory

public IdFactory getIdFactory()
Returns the factory for generating identifiers.

Specified by:
getIdFactory in interface ExceptionContext
Returns:
the factory for generating identifiers.

getThrowableHandleMode

public ThrowableHandleMode getThrowableHandleMode()
Description copied from interface: ExceptionContext
Returns the configuration to control the handling of throwables.

Specified by:
getThrowableHandleMode in interface ExceptionContext
Returns:
the configured mode.

getCodeMessageFormatter

public CodeMessageFormatter getCodeMessageFormatter()
Description copied from interface: ExceptionContext
Returns the formatter for code messages. Override to control the representation of exception and message bean instances.

Specified by:
getCodeMessageFormatter in interface ExceptionContext
Returns:
the formatter for code messages.


Copyright © 2007-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.