org.jboss.weld.context.ManagedContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of weld-osgi-bundle Show documentation
Show all versions of weld-osgi-bundle Show documentation
Weld runtime packaged as an OSGi bundle
package org.jboss.weld.context;
import javax.enterprise.context.spi.Context;
/**
*
* Lifecycle management for built in contexts. {@link ManagedContext} only
* allows a context to be activated, deactivated and destroyed. It does not
* allow the context to be associated with an underlying data store. These
* operations are defined on {@link BoundContext}.
*
*
*
* Weld provides a number of managed contexts: {@link SessionContext},
* {@link ConversationContext}, {@link RequestContext}. All these managed
* contexts are scoped to the thread, and propagation of the backing store
* between threads is the responsibility of the managed context user.
*
*
* @author Pete Muir
* @see BoundContext
*
*/
public interface ManagedContext extends Context
{
/**
* Activate the Context.
*/
public void activate();
/**
* Deactivate the Context, destroying any instances if the context is invalid.
*/
public void deactivate();
/**
* Mark the context as due for destruction when deactivate is called.
*/
public void invalidate();
}