net.sf.mmm.util.context.base
Class AbstractGenericContextFactory

java.lang.Object
  extended by net.sf.mmm.util.component.base.AbstractComponent
      extended by net.sf.mmm.util.component.base.AbstractLoggableComponent
          extended by net.sf.mmm.util.context.base.AbstractGenericContextFactory
All Implemented Interfaces:
GenericContextFactory
Direct Known Subclasses:
GenericContextFactoryImpl

public abstract class AbstractGenericContextFactory
extends AbstractLoggableComponent
implements GenericContextFactory

This is the abstract base-implementation of the GenericContextFactory interface.

Since:
2.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Constructor Summary
AbstractGenericContextFactory()
          The constructor.
 
Method Summary
 MutableGenericContext createContext()
          This method creates a new instance of a MutableGenericContext.
 
Methods inherited from class net.sf.mmm.util.component.base.AbstractLoggableComponent
doInitialize, getLogger, setLogger
 
Methods inherited from class net.sf.mmm.util.component.base.AbstractComponent
doInitialized, getInitializationState, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.mmm.util.context.api.GenericContextFactory
createContext, createContext
 

Constructor Detail

AbstractGenericContextFactory

public AbstractGenericContextFactory()
The constructor.

Method Detail

createContext

public MutableGenericContext createContext()
This method creates a new instance of a MutableGenericContext. It will use a HashMapFactory and delegate to GenericContextFactory.createContext(MapFactory).
ATTENTION:
Such context is usually suitable even if child-contexts are created and passed to other threads while the original thread is modifying the original context as proved in the according test-case. However HashMap.get(Object) is not academically thread-safe so if you need mission-critical safety, you might want to pass ConcurrentHashMapFactory to GenericContextFactory.createContext(MapFactory).

Specified by:
createContext in interface GenericContextFactory
Returns:
the new context.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.