public class ReferencedSolrDispatchFilter extends DelegatingSolrDispatchFilter
SolrDispatchFilter (implemented based on the
DelegatingSolrDispatchFilter abstract class) that does NOT create a
new CoreContainer, but retrieves it via a OSGI ServiceReference
from a BundleContext. This implementation also ensures that removing
the FIlter does NOT shutdown the
CoreContainer but instead.
releases the reference.
This does make is save to use this Filter in combination with a
CoreContainer that is managed as a SolrServerAdapter.
See TODO to see how to use Filters in combination with
the OSGI HttpService.
| Constructor and Description |
|---|
ReferencedSolrDispatchFilter(org.osgi.framework.BundleContext context,
org.osgi.framework.ServiceReference serviceReference)
Creates a new referenced Solr server dispatch filter.
|
| 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 ReferencedSolrDispatchFilter(org.osgi.framework.BundleContext context,
org.osgi.framework.ServiceReference serviceReference)
CoreContainer is not created (as by the normal
SolrDispatchFilter implementation)
but looked up via the parsed BundleContext based on the
ServiceReference.context - the BundleContext used to get/unget the CoreContainer serviceserviceReference - A ServiceReference to a CoreContainer
registered as OSGI service.protected 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.