public class SolrServiceDispatchFilter extends DelegatingSolrDispatchFilter
ServiceReference to parse the
CoreContainer to be used for the dispatch filter this allows to
parse the name or an own
Filter that is used to track CoreContainer
instances registered in the OSGI environment. In case of the empty
Constructor a simple Class filter is used to track for CoreContainer services.
The CoreContainer to be used for the dispatch filter is searched during the
the execution of the Servlets
Filter.init(javax.servlet.FilterConfig).
This implementation does NOT remove the Filter or change the CoreContainer
on any change in the OSGI environment. See SolrDispatchFilterComponent
if you need this functionality.
| Constructor and Description |
|---|
SolrServiceDispatchFilter(org.osgi.framework.BundleContext context)
Creates a Dispatch filter for CoreContainer registered as OSGI services.
|
SolrServiceDispatchFilter(org.osgi.framework.BundleContext context,
org.osgi.framework.Filter filter)
Creates a tracking Solr dispatch filter using the parsed filter to select
services.
|
SolrServiceDispatchFilter(org.osgi.framework.BundleContext context,
String solrServerName,
org.osgi.util.tracker.ServiceTrackerCustomizer stc)
Creates a tracking Solr dispatch filter for the CoreContainer with the
parsed
SolrConstants.PROPERTY_SERVER_NAME value |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.solr.core.CoreContainer |
getCoreContainer()
Getter for the
CoreContainer used for the Solr dispatch filter |
protected void |
ungetCoreContainer()
Releases the
CoreContainer no longer needed by the Solr dispatch
filter. |
createCoreContainer, destroypublic SolrServiceDispatchFilter(org.osgi.framework.BundleContext context,
String solrServerName,
org.osgi.util.tracker.ServiceTrackerCustomizer stc)
throws org.osgi.framework.InvalidSyntaxException
SolrConstants.PROPERTY_SERVER_NAME valuecontext - the contextsolrServerName - the name of the CoreContainer (value of the SolrConstants.PROPERTY_SERVER_NAME)stc - An optional ServiceTrackerCustomizer used for the tracking
the CoreContainerorg.osgi.framework.InvalidSyntaxException - if the created Filter for the parsed name is invalidpublic SolrServiceDispatchFilter(org.osgi.framework.BundleContext context,
org.osgi.framework.Filter filter)
CoreContainer instances!context - the contextfilter - the Filter that selects the CoreContainer service
to be used for Request dispatching.
the CoreContainerpublic SolrServiceDispatchFilter(org.osgi.framework.BundleContext context)
CoreContainer is available the one with the
highest Constants.SERVICE_RANKING will be used. Instances with
no or the same Service rank are not sorted.context - the context used to look for the CoreContainerprotected org.apache.solr.core.CoreContainer getCoreContainer()
DelegatingSolrDispatchFilterCoreContainer used for the Solr dispatch filtergetCoreContainer in class DelegatingSolrDispatchFilterprotected void ungetCoreContainer()
DelegatingSolrDispatchFilterCoreContainer no longer needed by the Solr dispatch
filter.ungetCoreContainer in class DelegatingSolrDispatchFilterCopyright © 2010–2016 The Apache Software Foundation. All rights reserved.