org.eclipse.jetty.example.asyncrest
Class AbstractRestServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.eclipse.jetty.example.asyncrest.AbstractRestServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- Direct Known Subclasses:
- AsyncRestServlet, SerialRestServlet
public class AbstractRestServlet
- extends javax.servlet.http.HttpServlet
Abstract Servlet implementation class AsyncRESTServlet.
Enquires ebay REST service for auctions by key word.
May be configured with init parameters:
- appid
- The eBay application ID to use
Each request examines the following request parameters:
- items
- The keyword to search for
- See Also:
- Serialized Form
Method Summary |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected java.lang.String |
generateThumbs(java.util.Queue<java.util.Map<java.lang.String,java.lang.String>> results)
|
void |
init(javax.servlet.ServletConfig servletConfig)
|
protected java.lang.String |
ms(long nano)
|
protected java.lang.String |
restURL(java.lang.String item)
|
protected int |
width(long nano)
|
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, 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 |
__DEFAULT_APPID
protected static final java.lang.String __DEFAULT_APPID
- See Also:
- Constant Field Values
STYLE
protected static final java.lang.String STYLE
- See Also:
- Constant Field Values
ITEMS_PARAM
protected static final java.lang.String ITEMS_PARAM
- See Also:
- Constant Field Values
APPID_PARAM
protected static final java.lang.String APPID_PARAM
- See Also:
- Constant Field Values
_appid
protected java.lang.String _appid
AbstractRestServlet
public AbstractRestServlet()
init
public void init(javax.servlet.ServletConfig servletConfig)
throws javax.servlet.ServletException
- Specified by:
init
in interface javax.servlet.Servlet
- Overrides:
init
in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
restURL
protected java.lang.String restURL(java.lang.String item)
generateThumbs
protected java.lang.String generateThumbs(java.util.Queue<java.util.Map<java.lang.String,java.lang.String>> results)
ms
protected java.lang.String ms(long nano)
width
protected int width(long nano)
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.