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, service
public 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.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected ServletBinder register(ServletBinder b)
b
- the newly created binder.Copyright © 2018 Eclipse JGit Project. All rights reserved.