org.jboss.webbeans.context
Class AbstractContext

java.lang.Object
  extended by org.jboss.webbeans.context.AbstractContext
All Implemented Interfaces:
Context
Direct Known Subclasses:
AbstractMapContext, DependentContext

public abstract class AbstractContext
extends java.lang.Object
implements Context

Common Context operation

Author:
Nicklas Karlsson, Pete Muir

Constructor Summary
AbstractContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
          Constructor
 
Method Summary
protected  java.lang.Boolean getActive()
          Delegates to a ThreadLocal instance
 java.lang.Class<? extends java.lang.annotation.Annotation> getScopeType()
          Get the scope the context is for
 boolean isActive()
          Return true if the context is active
 void setActive(boolean active)
          Set the context active, internal API for WBRI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.context.Context
get, get
 

Constructor Detail

AbstractContext

public AbstractContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
Constructor

Parameters:
scopeType - The scope type
Method Detail

getScopeType

public java.lang.Class<? extends java.lang.annotation.Annotation> getScopeType()
Get the scope the context is for

Specified by:
getScopeType in interface Context
Returns:
The scope type
See Also:
Context.getScopeType()

isActive

public boolean isActive()
Return true if the context is active

Specified by:
isActive in interface Context
Returns:
The active state
See Also:
Context.isActive()

setActive

public void setActive(boolean active)
Set the context active, internal API for WBRI

Parameters:
active - The new state

getActive

protected java.lang.Boolean getActive()
Delegates to a ThreadLocal instance



Copyright © 2011. All Rights Reserved.