19 package org.turro.elephant.direct;
21 import java.util.Collections;
22 import javax.servlet.ServletContext;
23 import javax.servlet.http.HttpServletRequest;
24 import javax.servlet.http.HttpServletResponse;
25 import org.turro.action.Actions;
26 import org.turro.collections.KeyValueMap;
27 import org.turro.elephant.context.ElephantContext;
28 import org.turro.elephant.context.IConstructor;
48 public boolean itsMe(String
id) {
53 public boolean myTurn(HttpServletRequest request) {
58 public void execute(ServletContext context, HttpServletRequest request, HttpServletResponse response) {
63 if(map ==
null &&
"POST".equals(request.getMethod())) {
64 map =
new KeyValueMap(Collections.EMPTY_MAP);
65 for(String key : request.getParameterMap().keySet()) {
66 map.put(key, request.getParameter(key));
static boolean isRightNowAction(IConstructor constructor)
static KeyValueMap getRightNowAction(IConstructor constructor)
static KeyValueMap getAction(IConstructor constructor)
static IConstructor getConstructor(HttpServletRequest request, HttpServletResponse response)
static String getRootWebPath()
abstract void doExecute(IConstructor constructor, KeyValueMap map)
boolean myTurn(HttpServletRequest request)
void execute(ServletContext context, HttpServletRequest request, HttpServletResponse response)
abstract String getIdentifier()
static boolean isYourTurn(HttpServletRequest request, String path)
static final String DIRECT_CONTENT_PATH