Example usage for org.apache.solr.servlet SolrDispatchFilter SolrDispatchFilter

List of usage examples for org.apache.solr.servlet SolrDispatchFilter SolrDispatchFilter

Introduction

In this page you can find the example usage for org.apache.solr.servlet SolrDispatchFilter SolrDispatchFilter.

Prototype

public SolrDispatchFilter() 

Source Link

Usage

From source file:com.nominanuda.solr.SpringMvcServerEmbed.java

License:Apache License

public void init() throws ServletException {
    FilterConfig fc = new FilterConfig() {
        public String getInitParameter(String name) {
            return null;
        }/*from   ww  w .  j  a v a2  s . c  o m*/

        public ServletContext getServletContext() {
            throw new UnsupportedOperationException();
        }

        @SuppressWarnings("rawtypes")
        public Enumeration getInitParameterNames() {
            throw new UnsupportedOperationException();
        }

        public String getFilterName() {
            throw new UnsupportedOperationException();
        }
    };
    solrDispatchFilter = new SolrDispatchFilter();
    solrDispatchFilter.init(fc);

    Check.illegalstate.assertFalse(SolrAware.getInstance().getCoreNames().isEmpty());
}