de.smartics.exceptions.i18n
Class I18nExceptionContextManager

Package class diagram package I18nExceptionContextManager
java.lang.Object
  extended by de.smartics.exceptions.runtime.AbstractExceptionContextManager<I18nExceptionContext>
      extended by de.smartics.exceptions.i18n.I18nExceptionContextManager

public final class I18nExceptionContextManager
     
     
extends AbstractExceptionContextManager< I18nExceptionContext>

Provides configuration information for exceptions per class loader.

Author:
Robert Reiner

Constructor Summary
I18nExceptionContextManager()
           
 
Method Summary
protected  I18nExceptionContext fetchContextFromService(ClassLoader classLoader)
          Returns the context configured by the service framework.
static BundleProvider getBundleProvider(ClassLoader classLoader)
          Convenience method to access the bundle provider for the given class loader.
protected  I18nExceptionContext 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 I18nExceptionContextManager getInstance()
          Returns the reference to the singleton.
static MessageComposer getMessageComposer(ClassLoader classLoader)
          Convenience method to access the message composer for the given class loader.
 
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
 

Constructor Detail

I18nExceptionContextManager

public I18nExceptionContextManager()
Method Detail

getInstance

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

Returns:
the reference to the singleton.

fetchContextFromService

protected I18nExceptionContext fetchContextFromService(ClassLoader classLoader)
Returns the context configured by the service framework.

Specified by:
fetchContextFromService in class AbstractExceptionContextManager<I18nExceptionContext>
Parameters:
classLoader - the class loader to use.
Returns:
the context configured by the service framework.
See Also:
AbstractExceptionContextManager.fetchContextFromService(java.lang.ClassLoader)

getDefaultExceptionContext

protected I18nExceptionContext getDefaultExceptionContext()
Returns the default context provided by the subclass.

Returns the default exception context.

new DefaultI18nExceptionContext( new UuidFactory(), new ClassPathBundleProvider(), new DefaultMessageComposer());

Specified by:
getDefaultExceptionContext in class AbstractExceptionContextManager<I18nExceptionContext>
Returns:
the default context configured.

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.

getBundleProvider

public static BundleProvider getBundleProvider(ClassLoader classLoader)
Convenience method to access the bundle provider for the given class loader.

Parameters:
classLoader - the class loader whose bundle provider is requested.
Returns:
the bundle provider for the given class loader.

getMessageComposer

public static MessageComposer getMessageComposer(ClassLoader classLoader)
Convenience method to access the message composer for the given class loader.

Parameters:
classLoader - the class loader whose message composer is requested.
Returns:
the message composer for the given class loader.


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