Class RequestContext

  • All Implemented Interfaces:
    jakarta.enterprise.context.spi.AlterableContext, jakarta.enterprise.context.spi.Context, Serializable

    public class RequestContext
    extends AbstractContext
    Request context implementation.
    See Also:
    Serialized Form
    • Constructor Detail

      • RequestContext

        public RequestContext()
    • Method Detail

      • getRequestObject

        public Object getRequestObject()
        The base object for the current RequestContext. For a synthetic 'request' this is null. For a real http ServletRequest this is the HttpServletRequest. This is what gets used as payload for various Initialized and Destroyed events. This can be overloaded in web requests.
        Returns:
        the ServletRequest or null for other kind of requests‚
      • setPropagatedSessionContext

        public void setPropagatedSessionContext​(SessionContext propagatedSessionContext)
      • getPropagatedSessionContext

        public SessionContext getPropagatedSessionContext()
        Returns:
        the SessionContext to get destroyed at the end of the request or null otherwise
      • getHttpSession

        public Object getHttpSession()
      • setHttpSession

        public void setHttpSession​(Object httpSession)
      • destroy

        public void destroy​(jakarta.enterprise.context.spi.Contextual<?> contextual)
        Specified by:
        destroy in interface jakarta.enterprise.context.spi.AlterableContext
        Overrides:
        destroy in class AbstractContext