All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.weld.context.http.HttpSessionContext Maven / Gradle / Ivy

There is a newer version: 3.0.0.Alpha1
Show newest version
package org.jboss.weld.context.http;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.jboss.weld.context.BoundContext;
import org.jboss.weld.context.SessionContext;

/**
 * 

* A session context which can be bound to the {@link HttpServletRequest}. The context is automatically attached to the map on * activation, and detached when {@link #invalidate()} is called. *

* *

* This context is not thread safe, and provides no thread safety for the underlying map. *

* * * @author Pete Muir * */ public interface HttpSessionContext extends BoundContext, SessionContext { /** *

* Mark the Session Context for destruction; the Session Context will be detached from the underling Http Session, and * instances marked for destruction when the Http Request is destroyed. *

* */ void invalidate(); /** *

* Returns false if the session has been invalidated (using {@link #invalidate()}). Returns true otherwise. *

* * @return true if {@link #invalidate()} has been called on this context */ boolean isValid(); /** *

* Destroy the session and all conversations stored in the session. *

* *

* If the context is not currently associated with a {@link HttpServletRequest}, then the context will be associated with * the specified {@link HttpSession} (for this thread), activated, destroyed, and then deactivated. *

* *

* If the context is already associated with a {@link HttpServletRequest} then this call will detach the context from the * underlying Http Session, and mark the context for destruction when the request is destroyed. *

* * @param session the {@link HttpSession} in which to store the bean instances * @return true if the context was destroyed immediately */ boolean destroy(HttpSession session); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy