public class SolrDispatchFilter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SolrDispatchFilter.Action
Enum to define action that needs to be processed.
|
static class |
SolrDispatchFilter.ClosedServletInputStream |
static class |
SolrDispatchFilter.ClosedServletOutputStream |
Modifier and Type | Field and Description |
---|---|
protected String |
abortErrorMessage |
protected CoreContainer |
cores |
protected org.apache.http.client.HttpClient |
httpClient |
protected CountDownLatch |
init |
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 and Description |
---|
SolrDispatchFilter() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
closeOnDestroy(boolean closeOnDestroy) |
static javax.servlet.http.HttpServletRequest |
closeShield(javax.servlet.http.HttpServletRequest request,
boolean retry)
Wrap the request's input stream with a close shield.
|
static javax.servlet.http.HttpServletResponse |
closeShield(javax.servlet.http.HttpServletResponse response,
boolean retry)
Wrap the response's output stream with a close shield.
|
protected CoreContainer |
createCoreContainer(Path solrHome,
Properties extraProperties)
Override this to change CoreContainer initialization
|
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() |
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) |
static NodeConfig |
loadNodeConfig(Path solrHome,
Properties nodeProperties)
Get the NodeConfig whether stored on disk, in ZooKeeper, etc.
|
protected volatile CoreContainer cores
protected final CountDownLatch init
protected String abortErrorMessage
protected org.apache.http.client.HttpClient httpClient
public static final String PROPERTIES_ATTRIBUTE
public static final String SOLRHOME_ATTRIBUTE
public static final String SOLR_INSTALL_DIR_ATTRIBUTE
public static final String SOLR_DEFAULT_CONFDIR_ATTRIBUTE
public static final String SOLR_LOG_MUTECONSOLE
public static final String SOLR_LOG_LEVEL
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
javax.servlet.ServletException
protected CoreContainer createCoreContainer(Path solrHome, Properties extraProperties)
public static NodeConfig loadNodeConfig(Path solrHome, Properties nodeProperties)
public CoreContainer getCores()
public void destroy()
public void close()
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doFilter(javax.servlet.ServletRequest _request, javax.servlet.ServletResponse _response, javax.servlet.FilterChain chain, boolean retry) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected HttpSolrCall getHttpSolrCall(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean retry)
public static javax.servlet.http.HttpServletRequest closeShield(javax.servlet.http.HttpServletRequest request, boolean retry)
request
- The request to wrap.retry
- If this is an original request or a retry.InputStream
that will ignore calls to close.public static javax.servlet.http.HttpServletResponse closeShield(javax.servlet.http.HttpServletResponse response, boolean retry)
response
- The response to wrap.retry
- If this response corresponds to an original request or a retry.OutputStream
that will ignore calls to close.public void closeOnDestroy(boolean closeOnDestroy)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.