org.gcube.smartgears.extensions
Class HttpExtension

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by 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

An ApplicationExtension that implements the HttpServlet interface

Author:
Fabio Simeoni
See Also:
Serialized Form

Nested Class Summary
static class HttpExtension.Method
          Enumeration of HTTP methods.
 
Constructor Summary
protected HttpExtension()
           
  HttpExtension(String name, String mapping)
           
 
Method Summary
protected  ApplicationContext context()
           
 Set<String> excludes()
          Returns the set of request paths that should be excluded from request management.
 void init()
           
 void init(ApplicationContext context)
          Initialises the extensions with the context of the application.
 String mapping()
          Returns the mapping of this extension.
 void mapping(String mapping)
           
 String name()
          Returns the name of this extension.
 void name(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
 
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

HttpExtension

protected HttpExtension()

HttpExtension

public HttpExtension(String name,
                     String mapping)
Method Detail

init

public final void init()
                throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

init

public void init(ApplicationContext context)
          throws Exception
Description copied from interface: ApplicationExtension
Initialises the extensions with the context of the application.

Specified by:
init in interface ApplicationExtension
Parameters:
context - the application context
Throws:
Exception - if the extension cannot be initialised

excludes

public Set<String> excludes()
Description copied from interface: ApplicationExtension
Returns the set of request paths that should be excluded from request management.

Specified by:
excludes in interface ApplicationExtension
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: ApplicationExtension
Returns the name of this extension.

Specified by:
name in interface ApplicationExtension
Returns:
the name

name

public void name(String name)

mapping

public String mapping()
Description copied from interface: ApplicationExtension
Returns the mapping of this extension.

Specified by:
mapping in interface ApplicationExtension
Returns:
the mapping

mapping

public void mapping(String mapping)


Copyright © 2014. All Rights Reserved.