Package com.ibm.wsspi.webcontainer
Class WebContainerRequestState
- java.lang.Object
-
- com.ibm.wsspi.webcontainer.WebContainerRequestState
-
public class WebContainerRequestState extends java.lang.Object
WebContainerRequestState is the thread local used to store per request info that can't be passed because of method signature requirements
-
-
Constructor Summary
Constructors Constructor Description WebContainerRequestState()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WebContainerRequestState
createInstance()
AsyncContext
getAsyncContext()
java.lang.Object
getAttribute(java.lang.String arg0)
java.lang.String
getCookieAttributes(java.lang.String cookieName)
Return the Cookie attributes associated with the provided cookieName that were added via the setCookieAttributes()IExtendedRequest
getCurrentThreadsIExtendedRequest()
IExtendedResponse
getCurrentThreadsIExtendedResponse()
static WebContainerRequestState
getInstance(boolean create)
void
init()
boolean
isArdRequest()
boolean
isAsyncMode()
boolean
isCompleted()
boolean
isInvokedFilters()
void
removeAttribute(java.lang.String arg0)
void
removeCookieAttributes(java.lang.String cookieName)
Removes the Cookie attributes associated with the cookieName that were added via setCookieAttributes().void
setArdRequest(boolean ardRequest)
void
setAsyncContext(AsyncContext asyncContext2)
void
setAsyncMode(boolean b)
void
setAttribute(java.lang.String string, java.lang.Object obj)
void
setCompleted(boolean completed)
void
setCookieAttributes(java.lang.String cookieName, java.lang.String cookieAttributes)
Allows Cookie attributes to be set on a particular Cookie specified by the cookieName parameter.void
setCurrentThreadsIExtendedRequest(IExtendedRequest currentThreadsIExtendedRequest)
void
setCurrentThreadsIExtendedResponse(IExtendedResponse hres)
void
setInvokedFilters(boolean filters)
-
-
-
Method Detail
-
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(java.lang.String string, java.lang.Object obj)
-
getAttribute
public java.lang.Object getAttribute(java.lang.String arg0)
-
removeAttribute
public void removeAttribute(java.lang.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(java.lang.String cookieName, java.lang.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 java.lang.String getCookieAttributes(java.lang.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(java.lang.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.
-
-