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:
- Serializable, Servlet, ServletConfig
- Direct Known Subclasses:
- AsyncRestServlet, SerialRestServlet
public class AbstractRestServlet
- extends 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
__DEFAULT_APPID
protected static final String __DEFAULT_APPID
- See Also:
- Constant Field Values
STYLE
protected static final String STYLE
- See Also:
- Constant Field Values
ITEMS_PARAM
protected static final String ITEMS_PARAM
- See Also:
- Constant Field Values
APPID_PARAM
protected static final String APPID_PARAM
- See Also:
- Constant Field Values
_appid
protected String _appid
AbstractRestServlet
public AbstractRestServlet()
init
public void init(ServletConfig servletConfig)
throws ServletException
- Specified by:
init
in interface Servlet
- Overrides:
init
in class GenericServlet
- Throws:
ServletException
restURL
protected String restURL(String item)
generateThumbs
protected String generateThumbs(Queue<Map<String,String>> results)
ms
protected String ms(long nano)
width
protected int width(long nano)
doPost
protected void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Overrides:
doPost
in class HttpServlet
- Throws:
ServletException
IOException
Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.