Class HttpServletContentRequestContext

java.lang.Object
org.apache.nifi.web.HttpServletContentRequestContext
All Implemented Interfaces:
ContentRequestContext

public class HttpServletContentRequestContext extends Object implements ContentRequestContext
An implementation of the ConfigurationRequestContext that retrieves configuration from a HttpServletRequest instance.
  • Field Details

    • dataRef

      private final String dataRef
    • clusterNodeId

      private final String clusterNodeId
    • clientId

      private final String clientId
    • PROXY_CONTEXT_PATH_HTTP_HEADER

      private static final String PROXY_CONTEXT_PATH_HTTP_HEADER
      See Also:
    • FORWARDED_CONTEXT_HTTP_HEADER

      private static final String FORWARDED_CONTEXT_HTTP_HEADER
      See Also:
    • FORWARDED_PREFIX_HTTP_HEADER

      private static final String FORWARDED_PREFIX_HTTP_HEADER
      See Also:
  • Constructor Details

    • HttpServletContentRequestContext

      public HttpServletContentRequestContext(jakarta.servlet.http.HttpServletRequest request)
  • Method Details

    • getFirstHeaderValue

      private String getFirstHeaderValue(jakarta.servlet.http.HttpServletRequest httpServletRequest, String... keys)
      Returns the value for the first key discovered when inspecting the current request. Will return null if there are no keys specified or if none of the specified keys are found.
      Parameters:
      keys - http header keys
      Returns:
      the value for the first key found
    • getDataUri

      public String getDataUri()
      Specified by:
      getDataUri in interface ContentRequestContext
    • getClusterNodeId

      public String getClusterNodeId()
      Specified by:
      getClusterNodeId in interface ContentRequestContext
    • getClientId

      public String getClientId()
      Specified by:
      getClientId in interface ContentRequestContext