public class HttpController extends HttpExtension
HttpExtension that dispatches to one or more ApiResources, handling the generic, HTTP-aspects
aspects of their client interactionsHttpExtension.Method| Constructor and Description |
|---|
HttpController(String name,
String mapping)
Creates an instance with a given name and a given mapping.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addResources(ApiResource... resources)
Adds one ore more
ApiResources to this controller. |
Set<String> |
excludes()
Returns the set of request paths that should be excluded from request management.
|
void |
init(ApplicationContext context)
Initialises the extensions with the context of the application.
|
void |
service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp) |
context, init, mapping, mapping, name, namedoDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicedestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, logpublic void addResources(ApiResource... resources)
ApiResources to this controller.resources - the resourcespublic void init(ApplicationContext context) throws Exception
ApplicationExtensioninit in interface ApplicationExtensioninit in class HttpExtensioncontext - the application contextException - if the extension cannot be initialisedpublic Set<String> excludes()
ApplicationExtensionexcludes in interface ApplicationExtensionexcludes in class HttpExtensionpublic final void service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp)
throws javax.servlet.ServletException,
IOException
service in interface javax.servlet.Servletservice in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionCopyright © 2015. All Rights Reserved.