org.jboss.weld.context.RequestContext 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 java.util.Map;
import javax.enterprise.context.ConversationScoped;
import javax.enterprise.context.RequestScoped;
import javax.interceptor.InvocationContext;
import javax.servlet.ServletRequest;
import org.jboss.weld.context.bound.BoundConversationContext;
import org.jboss.weld.context.bound.BoundRequestContext;
import org.jboss.weld.context.ejb.EjbRequestContext;
import org.jboss.weld.context.http.HttpConversationContext;
import org.jboss.weld.context.http.HttpRequestContext;
/**
*
* The built in request context is associated with {@link RequestScoped} and is
* a managed context which can be activated, invalidated and deactivated.
*
*
*
* Weld comes with four implementation of the request context. The
* {@link HttpRequestContext}, in which conversations are bound to the
* {@link ServletRequest}, can be injected:
*
*
*
* @Inject @Http RequestContext requestContext;
*
*
*
* Alternatively the {@link BoundRequestContext} in which requests are bound a
* {@link Map} can be injected:
*
*
*
* @Inject @Bound RequestContext requestContext;
*
*
*
* Additionally, Weld provides an unbound request context (which is automatially
* bound to the thread) which can be injected:
*
*
*
* @Inject @Unbound RequestContext requestContext;
*
*
*
* Finally, Weld provides a request context which is bound to an
* {@link InvocationContext} and can be injected:
*
*
*
*
* @Inject @Ejb RequestContext requestContext;
*
*
* @author Pete Muir
* @see BoundRequestContext
* @see HttpRequestContext
* @see EjbRequestContext
* @see RequestScoped
*
*/
public interface RequestContext extends ManagedContext
{
}