|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.gcube.smartgears.extensions.HttpExtension
org.gcube.smartgears.extensions.ApiResource
public abstract class ApiResource
A resource-specifc API handled by an HttpController.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.gcube.smartgears.extensions.HttpExtension |
|---|
HttpExtension.Method |
| Constructor Summary | |
|---|---|
ApiResource(ApiSignature signature)
Creates an instance with a given signature. |
|
| Method Summary | |
|---|---|
boolean |
accepts(HttpExtension.Method method,
String type)
Returns true if this resource accepts a given media type for a given method. |
void |
doDelete(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
void |
doHead(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
void |
doOptions(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
void |
doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
void |
doTrace(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
static ApiSignature |
handles(String mapping)
Returns a ApiSignature that declares the method and media types handled by an ApiResource for a given mapping. |
static ApiMethodSignature |
method(HttpExtension.Method method)
Returns an ApiMethodSignature that declares the media types handled by an ApiResource for a given method. |
boolean |
produces(HttpExtension.Method method,
String type)
Returns true if this resource produces a given media type for a given method. |
ApiSignature |
signature()
Return the signature of this resource. |
boolean |
supports(HttpExtension.Method method)
Returns true if this resource supports a given method. |
| Methods inherited from class org.gcube.smartgears.extensions.HttpExtension |
|---|
context, excludes, init, init, mapping, mapping, name, name |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
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 |
|---|
public ApiResource(ApiSignature signature)
signature - the signature| Method Detail |
|---|
public static ApiSignature handles(String mapping)
ApiSignature that declares the method and media types handled by an ApiResource for a given mapping.
mapping - the mapping
public static ApiMethodSignature method(HttpExtension.Method method)
ApiMethodSignature that declares the media types handled by an ApiResource for a given method.
method - the method
public boolean supports(HttpExtension.Method method)
true if this resource supports a given method.
method - the method
true if this resource supports the given method
public boolean accepts(HttpExtension.Method method,
String type)
true if this resource accepts a given media type for a given method.
method - the methodtype - the media type
true if this resource accepts the given media type for the given method
public boolean produces(HttpExtension.Method method,
String type)
true if this resource produces a given media type for a given method.
method - the methodtype - the media type
true if this resource produces the given media type for the given methodpublic ApiSignature signature()
public void doHead(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doHead in class javax.servlet.http.HttpServletjavax.servlet.ServletException
IOException
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletException
IOException
public void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletException
IOException
public void doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doPut in class javax.servlet.http.HttpServletjavax.servlet.ServletException
IOException
public void doDelete(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doDelete in class javax.servlet.http.HttpServletjavax.servlet.ServletException
IOException
public void doOptions(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doOptions in class javax.servlet.http.HttpServletjavax.servlet.ServletException
IOException
public void doTrace(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doTrace in class javax.servlet.http.HttpServletjavax.servlet.ServletException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||