de.smartics.exceptions.runtime
Class ExceptionContextManager

Package class diagram package ExceptionContextManager
java.lang.Object
  extended by de.smartics.exceptions.runtime.AbstractExceptionContextManager<ExceptionContext>
      extended by de.smartics.exceptions.runtime.ExceptionContextManager

public final class ExceptionContextManager
     
     
extends AbstractExceptionContextManager< ExceptionContext>

Provides configuration information for exceptions per class loader.


Field Summary
static ExceptionContext DEFAULT_EXCEPTION_CONTEXT
          The default context if none is provided for a given class loader.
 
Constructor Summary
ExceptionContextManager()
           
 
Method Summary
protected  ExceptionContext fetchContextFromService(ClassLoader classLoader)
          Returns the context configured by the service framework.
protected  ExceptionContext getDefaultExceptionContext()
          Returns the default context provided by the subclass.
static IdFactory getFactory(ClassLoader classLoader)
          Convenience method to access the ID factory for the given class loader.
static CodeMessageFormatter getFormatter(ClassLoader classLoader)
          Convenience method to access the formatter for code messages for the given class loader.
static ExceptionContextManager getInstance()
          Returns the reference to the singleton.
 
Methods inherited from class de.smartics.exceptions.runtime.AbstractExceptionContextManager
fetchContext, getContext, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EXCEPTION_CONTEXT

public static final ExceptionContext DEFAULT_EXCEPTION_CONTEXT
The default context if none is provided for a given class loader.

Constructor Detail

ExceptionContextManager

public ExceptionContextManager()
Method Detail

getInstance

public static ExceptionContextManager getInstance()
Returns the reference to the singleton.

Returns:
the reference to the singleton.

fetchContextFromService

protected ExceptionContext fetchContextFromService(ClassLoader classLoader)
Description copied from class: AbstractExceptionContextManager
Returns the context configured by the service framework.

Specified by:
fetchContextFromService in class AbstractExceptionContextManager<ExceptionContext>
Parameters:
classLoader - the class loader to use.
Returns:
the context configured by the service framework.

getDefaultExceptionContext

protected ExceptionContext getDefaultExceptionContext()
Description copied from class: AbstractExceptionContextManager
Returns the default context provided by the subclass.

Specified by:
getDefaultExceptionContext in class AbstractExceptionContextManager<ExceptionContext>
Returns:
the default context provided by the subclass.

getFactory

public static IdFactory getFactory(ClassLoader classLoader)
Convenience method to access the ID factory for the given class loader.

Parameters:
classLoader - the class loader whose ID factory is requested.
Returns:
the ID factory for the given class loader.

getFormatter

public static CodeMessageFormatter getFormatter(ClassLoader classLoader)
Convenience method to access the formatter for code messages for the given class loader.

Parameters:
classLoader - the class loader whose formatter for code messages is requested.
Returns:
the formatter for code messages for the given class loader.


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