1 /*
2 * Copyright (C) 2009-2010, Google Inc. and others
3 *
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Distribution License v. 1.0 which is available at
6 * https://www.eclipse.org/org/documents/edl-v10.php.
7 *
8 * SPDX-License-Identifier: BSD-3-Clause
9 */
10
11 package org.eclipse.jgit.http.server.glue;
12
13 import javax.servlet.Filter;
14 import javax.servlet.http.HttpServlet;
15
16 /**
17 * Binds a servlet to a URL.
18 */
19 public interface ServletBinder {
20 /**
21 * Set the filter to trigger while processing the path.
22 *
23 * @param filter
24 * the filter to trigger while processing the path.
25 * @return {@code this}.
26 */
27 ServletBinder through(Filter filter);
28
29 /**
30 * Set the servlet to execute on this path
31 *
32 * @param servlet
33 * the servlet to execute on this path.
34 */
35 void with(HttpServlet servlet);
36 }