Package org.gcube.smartgears.extensions
Class HttpExtension
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.gcube.smartgears.extensions.HttpExtension
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig,ApplicationExtension
- Direct Known Subclasses:
ApiResource,HttpController
public abstract class HttpExtension extends javax.servlet.http.HttpServlet implements ApplicationExtension
AnApplicationExtensionthat implements theHttpServletinterface- Author:
- Fabio Simeoni
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpExtension.MethodEnumeration of HTTP methods.
-
Constructor Summary
Constructors Modifier Constructor Description protectedHttpExtension()HttpExtension(String name, String mapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ApplicationContextcontext()Set<Exclude>excludes()Returns the set of request paths that should be excluded from request management.voidinit()voidinit(ApplicationContext context)Initialises the extensions with the context of the application.Stringmapping()Returns the mapping of this extension.voidmapping(String mapping)Stringname()Returns the name of this extension.voidname(String name)-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
-
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
-
-
-
Method Detail
-
init
public final void init() throws javax.servlet.ServletException- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
init
public void init(ApplicationContext context) throws Exception
Description copied from interface:ApplicationExtensionInitialises the extensions with the context of the application.- Specified by:
initin interfaceApplicationExtension- Parameters:
context- the application context- Throws:
Exception- if the extension cannot be initialised
-
excludes
public Set<Exclude> excludes()
Description copied from interface:ApplicationExtensionReturns the set of request paths that should be excluded from request management.- Specified by:
excludesin interfaceApplicationExtension- Returns:
- the set of request paths that should be excluded from request management
-
context
protected ApplicationContext context()
-
name
public String name()
Description copied from interface:ApplicationExtensionReturns the name of this extension.- Specified by:
namein interfaceApplicationExtension- Returns:
- the name
-
name
public void name(String name)
-
mapping
public String mapping()
Description copied from interface:ApplicationExtensionReturns the mapping of this extension.- Specified by:
mappingin interfaceApplicationExtension- Returns:
- the mapping
-
mapping
public void mapping(String mapping)
-
-