You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ServletBinder.java 876B

123456789101112131415161718192021222324252627282930313233343536
  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. package org.eclipse.jgit.http.server.glue;
  11. import javax.servlet.Filter;
  12. import javax.servlet.http.HttpServlet;
  13. /**
  14. * Binds a servlet to a URL.
  15. */
  16. public interface ServletBinder {
  17. /**
  18. * Set the filter to trigger while processing the path.
  19. *
  20. * @param filter
  21. * the filter to trigger while processing the path.
  22. * @return {@code this}.
  23. */
  24. ServletBinder through(Filter filter);
  25. /**
  26. * Set the servlet to execute on this path
  27. *
  28. * @param servlet
  29. * the servlet to execute on this path.
  30. */
  31. void with(HttpServlet servlet);
  32. }