Package org.apache.solr.servlet
Class SolrDispatchFilter
- java.lang.Object
-
- org.apache.solr.servlet.SolrDispatchFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
,PathExcluder
public class SolrDispatchFilter extends Object implements PathExcluder
This filter looks at the incoming URL maps them to handlers defined in solrconfig.xml- Since:
- solr 1.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SolrDispatchFilter.Action
Enum to define action that needs to be processed.static interface
SolrDispatchFilter.HttpSolrCallFactory
internal API
-
Field Summary
Fields Modifier and Type Field Description protected String
abortErrorMessage
static String
ATTR_TRACING_SPAN
static String
ATTR_TRACING_TRACER
protected CountDownLatch
init
boolean
isV2Enabled
static String
PROPERTIES_ATTRIBUTE
static String
SOLR_DEFAULT_CONFDIR_ATTRIBUTE
static String
SOLR_INSTALL_DIR_ATTRIBUTE
static String
SOLR_LOG_LEVEL
static String
SOLR_LOG_MUTECONSOLE
static String
SOLRHOME_ATTRIBUTE
-
Constructor Summary
Constructors Constructor Description SolrDispatchFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
void
doFilter(javax.servlet.ServletRequest _request, javax.servlet.ServletResponse _response, javax.servlet.FilterChain chain, boolean retry)
CoreContainer
getCores()
org.apache.http.client.HttpClient
getHttpClient()
protected HttpSolrCall
getHttpSolrCall(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean retry)
Allow a subclass to modify the HttpSolrCall.void
init(javax.servlet.FilterConfig config)
void
setExcludePatterns(List<Pattern> excludePatterns)
-
-
-
Field Detail
-
ATTR_TRACING_SPAN
public static final String ATTR_TRACING_SPAN
-
ATTR_TRACING_TRACER
public static final String ATTR_TRACING_TRACER
-
init
protected final CountDownLatch init
-
abortErrorMessage
protected String abortErrorMessage
-
isV2Enabled
public final boolean isV2Enabled
-
PROPERTIES_ATTRIBUTE
public static final String PROPERTIES_ATTRIBUTE
- See Also:
- Constant Field Values
-
SOLRHOME_ATTRIBUTE
public static final String SOLRHOME_ATTRIBUTE
- See Also:
- Constant Field Values
-
SOLR_INSTALL_DIR_ATTRIBUTE
public static final String SOLR_INSTALL_DIR_ATTRIBUTE
- See Also:
- Constant Field Values
-
SOLR_DEFAULT_CONFDIR_ATTRIBUTE
public static final String SOLR_DEFAULT_CONFDIR_ATTRIBUTE
- See Also:
- Constant Field Values
-
SOLR_LOG_MUTECONSOLE
public static final String SOLR_LOG_MUTECONSOLE
- See Also:
- Constant Field Values
-
SOLR_LOG_LEVEL
public static final String SOLR_LOG_LEVEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
setExcludePatterns
public void setExcludePatterns(List<Pattern> excludePatterns)
- Specified by:
setExcludePatterns
in interfacePathExcluder
-
getHttpClient
public org.apache.http.client.HttpClient getHttpClient()
-
init
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
- Specified by:
init
in interfacejavax.servlet.Filter
- Throws:
javax.servlet.ServletException
-
getCores
public CoreContainer getCores() throws javax.servlet.UnavailableException
- Throws:
javax.servlet.UnavailableException
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejavax.servlet.Filter
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
- Specified by:
doFilter
in interfacejavax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
-
doFilter
public void doFilter(javax.servlet.ServletRequest _request, javax.servlet.ServletResponse _response, javax.servlet.FilterChain chain, boolean retry) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
getHttpSolrCall
protected HttpSolrCall getHttpSolrCall(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean retry)
Allow a subclass to modify the HttpSolrCall. In particular, subclasses may want to add attributes to the request and send errors differently
-
-