org.apache.webbeans.context
Class ContextFactory

java.lang.Object
  extended by org.apache.webbeans.context.ContextFactory

public final class ContextFactory
extends Object

JSR-299 based standard context related operations.


Constructor Summary
ContextFactory(WebBeansContext webBeansContext)
           
 
Method Summary
 void activateContext(Class<? extends Annotation> scopeType)
          Activate context.
 void deActivateContext(Class<? extends Annotation> scopeType)
          Deactivate context.
 void destroyApplicationContext(Object parameter)
          Destroys the application context and all of its components at the end of the application.
 void destroyConversationContext()
           
 void destroyRequestContext(Object request)
           
 void destroySessionContext(Object session)
           
 void destroySingletonContext(Object parameter)
           
 javax.enterprise.context.spi.Context getCustomContext(javax.enterprise.context.spi.Context context)
           
 javax.enterprise.context.spi.Context getStandardContext(Class<? extends Annotation> scopeType)
          Gets the standard context with given scope type.
 javax.enterprise.context.spi.Context getStandardContext(ContextsService contextService, ContextTypes type)
           
 javax.enterprise.context.spi.Context getStandardContext(ContextTypes type)
          Gets the current context with given type.
 void initApplicationContext(Object parameter)
           
 void initConversationContext(Object context)
           
 void initRequestContext(Object request)
           
 void initSessionContext(Object session)
           
 void initSingletonContext(Object parameter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextFactory

public ContextFactory(WebBeansContext webBeansContext)
Method Detail

initRequestContext

public void initRequestContext(Object request)

getCustomContext

public javax.enterprise.context.spi.Context getCustomContext(javax.enterprise.context.spi.Context context)

destroyRequestContext

public void destroyRequestContext(Object request)

initSessionContext

public void initSessionContext(Object session)

destroySessionContext

public void destroySessionContext(Object session)

initApplicationContext

public void initApplicationContext(Object parameter)

destroyApplicationContext

public void destroyApplicationContext(Object parameter)
Destroys the application context and all of its components at the end of the application.

Parameters:
parameter - parameter object

initSingletonContext

public void initSingletonContext(Object parameter)

destroySingletonContext

public void destroySingletonContext(Object parameter)

initConversationContext

public void initConversationContext(Object context)

destroyConversationContext

public void destroyConversationContext()

getStandardContext

public javax.enterprise.context.spi.Context getStandardContext(ContextTypes type)
                                                        throws javax.enterprise.context.ContextNotActiveException
Gets the current context with given type.

Returns:
the current context
Throws:
javax.enterprise.context.ContextNotActiveException - if context is not active
IllegalArgumentException - if the type is not a standard context

getStandardContext

public javax.enterprise.context.spi.Context getStandardContext(ContextsService contextService,
                                                               ContextTypes type)
                                                        throws javax.enterprise.context.ContextNotActiveException
Throws:
javax.enterprise.context.ContextNotActiveException

getStandardContext

public javax.enterprise.context.spi.Context getStandardContext(Class<? extends Annotation> scopeType)
Gets the standard context with given scope type.

Returns:
the current context, or null if no standard context exists for the given scopeType

activateContext

public void activateContext(Class<? extends Annotation> scopeType)
Activate context.


deActivateContext

public void deActivateContext(Class<? extends Annotation> scopeType)
Deactivate context.



Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.