public class MetaServlet
extends javax.servlet.http.HttpServlet
Callers can create and configure a new processing pipeline by using one of
the serve(String) or serveRegex(String) methods to allocate
a binder for a particular URL pattern.
Registered filters and servlets are initialized lazily, usually during the first request. Once initialized the bindings in this servlet cannot be modified without destroying the servlet and thereby destroying all registered filters and servlets.
| Modifier | Constructor and Description |
|---|---|
|
MetaServlet()
Empty servlet with no bindings.
|
protected |
MetaServlet(MetaFilter delegateFilter)
Initialize a servlet wrapping a filter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
protected MetaFilter |
getDelegateFilter()
Get delegate filter
|
void |
init(javax.servlet.ServletConfig config) |
protected ServletBinder |
register(ServletBinder b)
Configure a newly created binder.
|
ServletBinder |
serve(String path)
Construct a binding for a specific path.
|
ServletBinder |
serveRegex(String expression)
Construct a binding for a regular expression.
|
protected void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicepublic MetaServlet()
protected MetaServlet(MetaFilter delegateFilter)
delegateFilter - the filter being wrapped by the servlet.protected MetaFilter getDelegateFilter()
public ServletBinder serve(String path)
path - pattern to match.public ServletBinder serveRegex(String expression)
expression - the regular expression to pattern match the URL against.public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletprotected void service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
IOException
service in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected ServletBinder register(ServletBinder b)
b - the newly created binder.Copyright © 2020 Eclipse JGit Project. All rights reserved.