Class StandardResponseHeaderFilterHolder
- java.lang.Object
-
- org.apache.druid.server.initialization.jetty.StandardResponseHeaderFilterHolder
-
- All Implemented Interfaces:
ServletFilterHolder
public class StandardResponseHeaderFilterHolder extends Object implements ServletFilterHolder
Adds response headers that we want to have on all responses.
-
-
Constructor Summary
Constructors Constructor Description StandardResponseHeaderFilterHolder(ServerConfig serverConfig)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voiddeduplicateHeadersInProxyServlet(javax.servlet.http.HttpServletResponse proxyResponse, org.eclipse.jetty.client.api.Response serverResponse)Remove any standard headers in proxyResponse if they were also set in the origin response, serverResponse.EnumSet<javax.servlet.DispatcherType>getDispatcherType()The dispatcher type that this Filter should apply tojavax.servlet.FiltergetFilter()Get the Filter object that should be added to the servlet.Class<? extends javax.servlet.Filter>getFilterClass()Get the class of the Filter object that should be added to the servlet.Map<String,String>getInitParameters()Get Filter initialization parameters.StringgetPath()This method is deprecated, please implementServletFilterHolder.getPaths().-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.server.initialization.jetty.ServletFilterHolder
getPaths
-
-
-
-
Constructor Detail
-
StandardResponseHeaderFilterHolder
@Inject public StandardResponseHeaderFilterHolder(ServerConfig serverConfig)
-
-
Method Detail
-
deduplicateHeadersInProxyServlet
public static void deduplicateHeadersInProxyServlet(javax.servlet.http.HttpServletResponse proxyResponse, org.eclipse.jetty.client.api.Response serverResponse)Remove any standard headers in proxyResponse if they were also set in the origin response, serverResponse. This prevents duplicates headers from appearing in proxy responses. Used by implementations ofAsyncProxyServlet.
-
getFilter
public javax.servlet.Filter getFilter()
Description copied from interface:ServletFilterHolderGet the Filter object that should be added to the servlet. This method is considered "mutually exclusive" from the getFilterClass method. That is, one of them should return null and the other should return an actual value.- Specified by:
getFilterin interfaceServletFilterHolder- Returns:
- The Filter object to be added to the servlet
-
getFilterClass
public Class<? extends javax.servlet.Filter> getFilterClass()
Description copied from interface:ServletFilterHolderGet the class of the Filter object that should be added to the servlet. This method is considered "mutually exclusive" from the getFilter method. That is, one of them should return null and the other should return an actual value.- Specified by:
getFilterClassin interfaceServletFilterHolder- Returns:
- The class of the Filter object to be added to the servlet
-
getInitParameters
public Map<String,String> getInitParameters()
Description copied from interface:ServletFilterHolderGet Filter initialization parameters.- Specified by:
getInitParametersin interfaceServletFilterHolder- Returns:
- a map containing all the Filter initialization parameters
-
getPath
public String getPath()
Description copied from interface:ServletFilterHolderThis method is deprecated, please implementServletFilterHolder.getPaths(). The path that this Filter should apply to- Specified by:
getPathin interfaceServletFilterHolder- Returns:
- the path that this Filter should apply to
-
getDispatcherType
@Nullable public EnumSet<javax.servlet.DispatcherType> getDispatcherType()
Description copied from interface:ServletFilterHolderThe dispatcher type that this Filter should apply to- Specified by:
getDispatcherTypein interfaceServletFilterHolder- Returns:
- the enumeration of DispatcherTypes that this Filter should apply to
-
-