Search in sources :

Example 1 with MatcherFilter

use of spark.http.matching.MatcherFilter in project ddf by codice.

the class SparkServlet method init.

@Override
public void init(ServletConfig config) throws ServletException {
    super.init(config);
    ServletFlag.runFromServlet();
    populateWrapperSupplier(config);
    populateSparkApplications(config);
    sparkApplications.stream().sequential().forEach(SparkApplication::init);
    filterPath = getConfigPath(filterMappingPattern, config);
    matcherFilter = new MatcherFilter(ServletRoutes.get(), StaticFilesConfiguration.servletInstance, false, false);
}
Also used : MatcherFilter(spark.http.matching.MatcherFilter) SparkApplication(spark.servlet.SparkApplication)

Example 2 with MatcherFilter

use of spark.http.matching.MatcherFilter in project ddf by codice.

the class SparkServlet method init.

@Override
public void init(ServletConfig config) throws ServletException {
    super.init(config);
    ServletFlag.runFromServlet();
    populateWrapperSupplier(config);
    populateSparkApplications(config);
    sparkApplications.stream().sequential().forEach(SparkApplication::init);
    filterPath = getConfigPath(filterMappingPattern, config);
    matcherFilter = new MatcherFilter(ServletRoutes.get(), StaticFilesConfiguration.servletInstance, false, false);
}
Also used : MatcherFilter(spark.http.matching.MatcherFilter) SparkApplication(spark.servlet.SparkApplication)

Example 3 with MatcherFilter

use of spark.http.matching.MatcherFilter in project spark by perwendel.

the class SparkFilter method init.

@Override
public void init(FilterConfig filterConfig) throws ServletException {
    ServletFlag.runFromServlet();
    applications = getApplications(filterConfig);
    for (SparkApplication application : applications) {
        application.init();
    }
    filterPath = FilterTools.getFilterPath(filterConfig);
    matcherFilter = new MatcherFilter(ServletRoutes.get(), StaticFilesConfiguration.servletInstance, true, false);
}
Also used : MatcherFilter(spark.http.matching.MatcherFilter)

Example 4 with MatcherFilter

use of spark.http.matching.MatcherFilter in project spark by perwendel.

the class EmbeddedJettyFactory method create.

public EmbeddedServer create(Routes routeMatcher, StaticFilesConfiguration staticFilesConfiguration, boolean hasMultipleHandler) {
    MatcherFilter matcherFilter = new MatcherFilter(routeMatcher, staticFilesConfiguration, false, hasMultipleHandler);
    matcherFilter.init(null);
    JettyHandler handler = new JettyHandler(matcherFilter);
    return new EmbeddedJettyServer(handler);
}
Also used : MatcherFilter(spark.http.matching.MatcherFilter)

Aggregations

MatcherFilter (spark.http.matching.MatcherFilter)4 SparkApplication (spark.servlet.SparkApplication)2