Tuscany Core

org.apache.tuscany.core.context.scope
Class AbstractScopeContext

java.lang.Object
  extended by org.apache.tuscany.core.context.impl.AbstractLifecycle
      extended by org.apache.tuscany.core.context.scope.AbstractScopeContext
All Implemented Interfaces:
EventListener, Lifecycle, RuntimeEventListener, ScopeContext
Direct Known Subclasses:
ModuleScopeContext, RequestScopeContext, SessionScopeContext, StatelessScopeContext

public abstract class AbstractScopeContext
extends AbstractLifecycle
implements ScopeContext

Implements functionality common to scope contexts.

Version:
$Rev: 408581 $ $Date: 2006-05-21 23:34:24 -0700 (Sun, 21 May 2006) $

Field Summary
protected  Map<String,ContextFactory<Context>> contextFactories
           
protected  EventContext eventContext
           
 
Fields inherited from class org.apache.tuscany.core.context.impl.AbstractLifecycle
lifecycleState, name
 
Fields inherited from interface org.apache.tuscany.core.context.Lifecycle
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STARTED, STOPPED, STOPPING, UNINITIALIZED
 
Constructor Summary
AbstractScopeContext(EventContext eventContext)
           
 
Method Summary
protected  void checkInit()
           
protected  EventContext getEventContext()
           
 Object getInstance(QualifiedName qName)
           
 void registerFactories(List<ContextFactory<Context>> configurations)
          Registers the context factory used to construct instance contexts for the scope
 
Methods inherited from class org.apache.tuscany.core.context.impl.AbstractLifecycle
addListener, addListener, getLifecycleState, getListeners, getName, publish, removeListener, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tuscany.core.context.ScopeContext
getContext, getContextByKey, isCacheable, registerFactory, removeContext, removeContextByKey
 
Methods inherited from interface org.apache.tuscany.core.context.Lifecycle
getLifecycleState, getName, setName, start, stop
 
Methods inherited from interface org.apache.tuscany.core.context.RuntimeEventListener
onEvent
 

Field Detail

contextFactories

protected Map<String,ContextFactory<Context>> contextFactories

eventContext

protected EventContext eventContext
Constructor Detail

AbstractScopeContext

public AbstractScopeContext(EventContext eventContext)
Method Detail

registerFactories

public void registerFactories(List<ContextFactory<Context>> configurations)
Description copied from interface: ScopeContext
Registers the context factory used to construct instance contexts for the scope

Specified by:
registerFactories in interface ScopeContext

getInstance

public Object getInstance(QualifiedName qName)
                   throws TargetException
Specified by:
getInstance in interface ScopeContext
Throws:
TargetException

checkInit

protected void checkInit()

getEventContext

protected EventContext getEventContext()

Tuscany Core

-