Package ejava.examples.asyncmarket.web
Class BuyerHandlerServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- ejava.examples.asyncmarket.web.BuyerHandlerServlet
-
- All Implemented Interfaces:
Serializable
,Servlet
,ServletConfig
public class BuyerHandlerServlet extends HttpServlet
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
BuyerHandlerServlet.AdminMenu
private class
BuyerHandlerServlet.CreateAccount
private class
BuyerHandlerServlet.CreateOrder
private class
BuyerHandlerServlet.GetAvailableItems
private class
BuyerHandlerServlet.GetOrder
private class
BuyerHandlerServlet.Handler
private class
BuyerHandlerServlet.Logout
private class
BuyerHandlerServlet.PlaceOrder
-
Field Summary
Fields Modifier and Type Field Description static String
ADMIN_TYPE
private Buyer
buyer
static String
COMMAND_PARAM
static String
CREATE_ORDER_COMMAND
static String
CREATEACCOUNT_COMMAND
protected static String
DISPLAY_EXCEPTION_URL
static String
EXCEPTION_PARAM
static String
GET_AVAILABLE_ITEMS_COMMAND
static String
GET_ORDER_COMMAND
static String
HANDLER_TYPE_KEY
private Map<String,BuyerHandlerServlet.Handler>
handlers
private static org.slf4j.Logger
log
static String
LOGOUT_COMMAND
static String
MAINMENU_COMMAND
static String
PLACE_ORDER_COMMAND
private static String
UNKNOWN_COMMAND_URL
static String
USER_TYPE
private UserMgmt
userMgmt
-
Constructor Summary
Constructors Constructor Description BuyerHandlerServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
protected void
doGet(HttpServletRequest request, HttpServletResponse response)
protected void
doPost(HttpServletRequest request, HttpServletResponse response)
void
init()
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
-
-
-
Field Detail
-
log
private static org.slf4j.Logger log
-
handlers
private Map<String,BuyerHandlerServlet.Handler> handlers
-
buyer
private Buyer buyer
-
userMgmt
private UserMgmt userMgmt
-
COMMAND_PARAM
public static final String COMMAND_PARAM
- See Also:
- Constant Field Values
-
EXCEPTION_PARAM
public static final String EXCEPTION_PARAM
- See Also:
- Constant Field Values
-
HANDLER_TYPE_KEY
public static final String HANDLER_TYPE_KEY
- See Also:
- Constant Field Values
-
ADMIN_TYPE
public static final String ADMIN_TYPE
- See Also:
- Constant Field Values
-
USER_TYPE
public static final String USER_TYPE
- See Also:
- Constant Field Values
-
MAINMENU_COMMAND
public static final String MAINMENU_COMMAND
- See Also:
- Constant Field Values
-
CREATEACCOUNT_COMMAND
public static final String CREATEACCOUNT_COMMAND
- See Also:
- Constant Field Values
-
GET_AVAILABLE_ITEMS_COMMAND
public static final String GET_AVAILABLE_ITEMS_COMMAND
- See Also:
- Constant Field Values
-
CREATE_ORDER_COMMAND
public static final String CREATE_ORDER_COMMAND
- See Also:
- Constant Field Values
-
PLACE_ORDER_COMMAND
public static final String PLACE_ORDER_COMMAND
- See Also:
- Constant Field Values
-
GET_ORDER_COMMAND
public static final String GET_ORDER_COMMAND
- See Also:
- Constant Field Values
-
LOGOUT_COMMAND
public static final String LOGOUT_COMMAND
- See Also:
- Constant Field Values
-
DISPLAY_EXCEPTION_URL
protected static final String DISPLAY_EXCEPTION_URL
- See Also:
- Constant Field Values
-
UNKNOWN_COMMAND_URL
private static final String UNKNOWN_COMMAND_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init() throws ServletException
- Overrides:
init
in classGenericServlet
- Throws:
ServletException
-
doGet
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
- Overrides:
doGet
in classHttpServlet
- Throws:
ServletException
IOException
-
doPost
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
- Overrides:
doPost
in classHttpServlet
- Throws:
ServletException
IOException
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceServlet
- Overrides:
destroy
in classGenericServlet
-
-