Class WeldHttpServletRequest

java.lang.Object
cloud.piranha.extension.weld.RealtimeHttpServletRequestWrapper
cloud.piranha.extension.weld.WeldHttpServletRequest
All Implemented Interfaces:
jakarta.servlet.http.HttpServletRequest, jakarta.servlet.ServletRequest

public class WeldHttpServletRequest extends RealtimeHttpServletRequestWrapper
An HttpServletRequest wrapper that always delegates every operation to what has been set as the current request.

This allows Weld to hold on to a single HttpServletRequest instance, which can then be set to point to another HttpServletRequest instance as the current one that the request uses changes.

This instance changes for example after an authentication module or filter has provided a new HttpServletRequest, or when a dispatch or include is performed.

Author:
Arjan Tijms
  • Constructor Details

    • WeldHttpServletRequest

      public WeldHttpServletRequest(jakarta.servlet.http.HttpServletRequest request)
      Constructor.
      Parameters:
      request - the HTTP servlet request.
  • Method Details

    • getWrapped

      protected jakarta.servlet.http.HttpServletRequest getWrapped()
      Description copied from class: RealtimeHttpServletRequestWrapper
      Returns the wrapped request.
      Specified by:
      getWrapped in class RealtimeHttpServletRequestWrapper
      Returns:
      the wrapped request
    • getRequestId

      public String getRequestId()
    • getProtocolRequestId

      public String getProtocolRequestId()
    • getServletConnection

      public jakarta.servlet.ServletConnection getServletConnection()