|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
org.apache.sling.api.servlets.SlingSafeMethodsServlet
org.apache.sling.api.servlets.SlingAllMethodsServlet
org.apache.sling.launchpad.testservices.servlets.RequestUriOptingServlet
@Service(value=javax.servlet.Servlet.class) @Properties(value={@Property(name="service.description",value="Request URI Opting Test Servlet"),@Property(name="service.vendor",value="The Apache Software Foundation"),@Property(name="sling.servlet.resourceTypes",value={"sling/servlet/default","sling/nonexisting"}),@Property(name="sling.servlet.methods",value={"POST","GET"})}) public class RequestUriOptingServlet
OptingServlet that uses the RequestURI to opt in
Constructor Summary | |
---|---|
RequestUriOptingServlet()
|
Method Summary | |
---|---|
boolean |
accepts(SlingHttpServletRequest request)
Examines the request, and return true if this servlet is
willing to handle the request. |
protected void |
doGet(SlingHttpServletRequest request,
SlingHttpServletResponse response)
Called by the SlingSafeMethodsServlet.mayService(SlingHttpServletRequest, SlingHttpServletResponse) method to
handle an HTTP GET request. |
protected void |
doPost(SlingHttpServletRequest request,
SlingHttpServletResponse response)
Called by the SlingAllMethodsServlet.mayService(SlingHttpServletRequest, SlingHttpServletResponse) method to
handle an HTTP POST request. |
protected void |
dumpRequestAsProperties(SlingHttpServletRequest request,
SlingHttpServletResponse response)
|
Methods inherited from class org.apache.sling.api.servlets.SlingAllMethodsServlet |
---|
doDelete, doPut, getAllowedRequestMethods, isMethodValid, mayService |
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet |
---|
doGeneric, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, init, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.Servlet |
---|
destroy, getServletConfig, getServletInfo, init, service |
Constructor Detail |
---|
public RequestUriOptingServlet()
Method Detail |
---|
public boolean accepts(SlingHttpServletRequest request)
OptingServlet
true
if this servlet is
willing to handle the request. If false
is returned, the
request will be ignored by this servlet, and may be handled by other
servlets.
accepts
in interface OptingServlet
request
- The request to examine
true
if this servlet will handle the request,
false
otherwiseprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws javax.servlet.ServletException, IOException
SlingSafeMethodsServlet
SlingSafeMethodsServlet.mayService(SlingHttpServletRequest, SlingHttpServletResponse)
method to
handle an HTTP GET request.
This default implementation reports back to the client that the method is not supported.
Implementations of this class should overwrite this method with their implementation for the HTTP GET method support.
doGet
in class SlingSafeMethodsServlet
request
- The HTTP requestresponse
- The HTTP response
javax.servlet.ServletException
- Not thrown by this implementation.
IOException
- If the error status cannot be reported back to the
client.protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) throws javax.servlet.ServletException, IOException
SlingAllMethodsServlet
SlingAllMethodsServlet.mayService(SlingHttpServletRequest, SlingHttpServletResponse)
method to
handle an HTTP POST request.
This default implementation reports back to the client that the method is not supported.
Implementations of this class should overwrite this method with their implementation for the HTTP POST method support.
doPost
in class SlingAllMethodsServlet
request
- The HTTP requestresponse
- The HTTP response
javax.servlet.ServletException
- Not thrown by this implementation.
IOException
- If the error status cannot be reported back to the
client.protected void dumpRequestAsProperties(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |