ch.elca.el4j.tests.core
Class ModuleTestContextCache

java.lang.Object
  extended by ch.elca.el4j.tests.core.ModuleTestContextCache

public final class ModuleTestContextCache
extends Object

This class implements a cache for ModuleApplicationContexts.

Author:
Stefan Wismer (SWI)
File-location:
ModuleTestContextCache
Last check-in date:
2009-08-04 15:22:05 +0200 (Di, 04. Aug 2009) by swismer for revision 3881

Nested Class Summary
private static class ModuleTestContextCache.Configuration
          Data holder for ModuleApplicationContext configurations that can be used as key in Maps.
 
Field Summary
private static Map<ModuleTestContextCache.Configuration,ConfigurableApplicationContext> s_cache
          The actual cache.
 
Constructor Summary
private ModuleTestContextCache()
          The hidden constructor.
 
Method Summary
static void clear()
          Clear this ModuleApplicationContext cache.
private static ConfigurableApplicationContext get(ModuleTestContextCache.Configuration config)
           
static ConfigurableApplicationContext get(ModuleTestContextConfiguration config)
           
static ConfigurableApplicationContext get(String[] inclusiveConfigLocations, String[] exclusiveConfigLocations, boolean allowBeanDefinitionOverriding)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_cache

private static Map<ModuleTestContextCache.Configuration,ConfigurableApplicationContext> s_cache
The actual cache.

Constructor Detail

ModuleTestContextCache

private ModuleTestContextCache()
The hidden constructor.

Method Detail

get

public static ConfigurableApplicationContext get(ModuleTestContextConfiguration config)
Parameters:
config - a ModuleApplicationContext configuration
Returns:
the corresponding ModuleApplicationContext

get

public static ConfigurableApplicationContext get(String[] inclusiveConfigLocations,
                                                 String[] exclusiveConfigLocations,
                                                 boolean allowBeanDefinitionOverriding)
Parameters:
inclusiveConfigLocations - the string array with inclusive locations
exclusiveConfigLocations - the string array with exclusive locations
allowBeanDefinitionOverriding - true if bean definition overriding should be allowed
Returns:
the corresponding ModuleApplicationContext

clear

public static void clear()
Clear this ModuleApplicationContext cache.


get

private static ConfigurableApplicationContext get(ModuleTestContextCache.Configuration config)
Parameters:
config - a ModuleApplicationContext configuration
Returns:
the corresponding ModuleApplicationContext


Copyright © 2005-2011 ELCA. All Rights Reserved.