Package org.hippoecm.hst.core.container
Interface ValveContext
public interface ValveContext
Context information during invoking valves in a pipeline.
This holds the necessary objects to serve a request.
-
Method Summary
Modifier and TypeMethodDescriptionReturns thePageCacheContext
for this valve context.Returns the HstComponent container configuration.Returns the current request context.Returns the rootHstComponentWindow
instance to *render* the current request.Returns the rootHstComponentWindow
instance that is used to process the current request.jakarta.servlet.http.HttpServletRequest
Returns the current servlet request.jakarta.servlet.http.HttpServletResponse
Returns the current servlet response.void
Requests invocation of next possible valve.void
setRootComponentRenderingWindow
(HstComponentWindow rootComponentRenderingWindow) Sets the rootHstComponentWindow
instance to *render* the current requestvoid
setRootComponentWindow
(HstComponentWindow rootComponentWindow) Sets the rootHstComponentWindow
instancethat is used to process the current request.
-
Method Details
-
invokeNext
Requests invocation of next possible valve.- Throws:
ContainerException
-
getRequestContainerConfig
HstContainerConfig getRequestContainerConfig()Returns the HstComponent container configuration.- Returns:
- the HstComponent container configuration.
-
getRequestContext
HstRequestContext getRequestContext()Returns the current request context.- Returns:
- the current request context.
-
getServletRequest
jakarta.servlet.http.HttpServletRequest getServletRequest()Returns the current servlet request.- Returns:
- the current servlet request.
-
getServletResponse
jakarta.servlet.http.HttpServletResponse getServletResponse()Returns the current servlet response.- Returns:
- the current servlet response.
-
setRootComponentWindow
Sets the rootHstComponentWindow
instancethat is used to process the current request.- Parameters:
rootComponentWindow
-
-
getRootComponentWindow
HstComponentWindow getRootComponentWindow()Returns the rootHstComponentWindow
instance that is used to process the current request. Note that in case of a action/resource/component-rendering request the root component is in general the targeted (for the action/resource/component-rendering) component- Returns:
- the root
HstComponentWindow
instance that is used to process the current request.
-
setRootComponentRenderingWindow
Sets the rootHstComponentWindow
instance to *render* the current request- Parameters:
rootComponentRenderingWindow
-
-
getRootComponentRenderingWindow
HstComponentWindow getRootComponentRenderingWindow()Returns the root
HstComponentWindow
instance to *render* the current request. By default, this returns the sameHstComponentWindow
asgetRootComponentWindow()
, unless it is explicitly set to a differentHstComponentWindow
. For example in case when you want to render only a single (or subtree)HstComponent
of an entireHstComponent
hierarchy.The rootComponentRenderingWindow must always be a descendant of or the same as
getRootComponentWindow()
-
getPageCacheContext
PageCacheContext getPageCacheContext()Returns thePageCacheContext
for this valve context. IndividualValve
s can access thisPageCacheContext
and append key information to thePageCacheContext.getPageCacheKey()
or indicate that the request cannot be cached at all throughPageCacheContext.markUncacheable()
- Returns:
- the PageCacheContext for this valve context and never
null
-