Class WebContainerRequestState

java.lang.Object
com.ibm.wsspi.webcontainer.WebContainerRequestState

public class WebContainerRequestState extends Object
WebContainerRequestState is the thread local used to store per request info that can't be passed because of method signature requirements
  • Constructor Details

    • WebContainerRequestState

      public WebContainerRequestState()
  • Method Details

    • getCurrentThreadsIExtendedResponse

      public IExtendedResponse getCurrentThreadsIExtendedResponse()
    • setCurrentThreadsIExtendedRequest

      public void setCurrentThreadsIExtendedRequest(IExtendedRequest currentThreadsIExtendedRequest)
    • isAsyncMode

      public boolean isAsyncMode()
    • getInstance

      public static WebContainerRequestState getInstance(boolean create)
    • createInstance

      public static WebContainerRequestState createInstance()
    • init

      public void init()
    • setAttribute

      public void setAttribute(String string, Object obj)
    • getAttribute

      public Object getAttribute(String arg0)
    • removeAttribute

      public void removeAttribute(String arg0)
    • isInvokedFilters

      public boolean isInvokedFilters()
    • setInvokedFilters

      public void setInvokedFilters(boolean filters)
    • isCompleted

      public boolean isCompleted()
    • setCompleted

      public void setCompleted(boolean completed)
    • isArdRequest

      public boolean isArdRequest()
    • setArdRequest

      public void setArdRequest(boolean ardRequest)
    • setAsyncMode

      public void setAsyncMode(boolean b)
    • getCurrentThreadsIExtendedRequest

      public IExtendedRequest getCurrentThreadsIExtendedRequest()
    • getAsyncContext

      public AsyncContext getAsyncContext()
    • setAsyncContext

      public void setAsyncContext(AsyncContext asyncContext2)
    • setCurrentThreadsIExtendedResponse

      public void setCurrentThreadsIExtendedResponse(IExtendedResponse hres)
    • setCookieAttributes

      public void setCookieAttributes(String cookieName, String cookieAttributes)
      Allows Cookie attributes to be set on a particular Cookie specified by the cookieName parameter. Once the Cookie has been added to the Response the removeCookieAttribute method is called for the same cookieName. Currently the only Cookie attribute that is supported by the runtime here is the SameSite Cookie attribute. All other existing Cookie attributes must be added via the Cookie API. Using this API to add anything but the SameSite attribute will be ignored. The cookieAttribute should be in the form: attributeName=attributeValue.
      Parameters:
      cookieName - - The Cookie name to add the attribute to.
      cookieAttributes - - The Cookie attributes to be added in the form: attributeName = attributeValue. Currently, only SameSite=Lax|None|Strict is supported.
    • getCookieAttributes

      public String getCookieAttributes(String cookieName)
      Return the Cookie attributes associated with the provided cookieName that were added via the setCookieAttributes()
      Parameters:
      cookieName - - The name of the Cookie the attributes were set for.
      Returns:
      - The Cookie attributes associated with the specified Cookie name.
    • removeCookieAttributes

      public void removeCookieAttributes(String cookieName)
      Removes the Cookie attributes associated with the cookieName that were added via setCookieAttributes(). It does not remove any other attributes which were added via the Cookie API.
      Parameters:
      cookieName - - The name of the Cookie the attributes were set for.