public AbstractAgent(ConfigurationContext aConfigContext) { configContext = aConfigContext; preloadMethods(); }
/** * Callback method for index page. Forwards to {@link DEFAULT_INDEX_JSP} by default. * * @param httpServletRequest The incoming request. * @param httpServletResponse The outgoing response. */ protected void processIndex(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException { renderView(DEFAULT_INDEX_JSP, httpServletRequest, httpServletResponse); }
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException { // Don't use getRequestURI() here because it includes the session ID String requestURI = httpServletRequest.getServletPath() + httpServletRequest.getPathInfo(); String operation; int i = requestURI.lastIndexOf('/'); if (i < 0) { processUnknown(httpServletRequest, httpServletResponse); return; } else if (i == requestURI.length() - 1) { processIndex(httpServletRequest, httpServletResponse); return; } else { operation = requestURI.substring(i + 1); } Method method = (Method) operationCache.get(operation.toLowerCase()); if (method != null) { try { method.invoke(this, new Object[]{httpServletRequest, httpServletResponse}); } catch (Exception e) { log.warn("Error dispatching request " + requestURI, e); httpServletResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } } else { processUnknown(httpServletRequest, httpServletResponse); } }
private void preloadMethods() { Class clazz = getClass(); while (clazz != null && !clazz.equals(Object.class)) { examineMethods(clazz.getDeclaredMethods()); clazz = clazz.getSuperclass(); } }
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException { httpServletRequest = new ForbidSessionCreationWrapper(httpServletRequest); String query = httpServletRequest.getQueryString(); if (query != null) { if (HttpUtils.indexOfIngnoreCase(query , "wsdl2") > 0 || HttpUtils.indexOfIngnoreCase(query, "wsdl") > 0 || HttpUtils.indexOfIngnoreCase(query, "xsd") > 0 || HttpUtils.indexOfIngnoreCase(query, "policy") > 0) { processListService(httpServletRequest, httpServletResponse); } else { super.handle(httpServletRequest, httpServletResponse); } } else { super.handle(httpServletRequest, httpServletResponse); } }
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException { // Don't use getRequestURI() here because it includes the session ID String requestURI = httpServletRequest.getServletPath() + httpServletRequest.getPathInfo(); String operation; int i = requestURI.lastIndexOf('/'); if (i < 0) { processUnknown(httpServletRequest, httpServletResponse); return; } else if (i == requestURI.length() - 1) { processIndex(httpServletRequest, httpServletResponse); return; } else { operation = requestURI.substring(i + 1); } Method method = (Method) operationCache.get(operation.toLowerCase()); if (method != null) { try { method.invoke(this, new Object[]{httpServletRequest, httpServletResponse}); } catch (Exception e) { log.warn("Error dispatching request " + requestURI, e); httpServletResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } } else { processUnknown(httpServletRequest, httpServletResponse); } }
private void preloadMethods() { Class clazz = getClass(); while (clazz != null && !clazz.equals(Object.class)) { examineMethods(clazz.getDeclaredMethods()); clazz = clazz.getSuperclass(); } }
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException { httpServletRequest = new ForbidSessionCreationWrapper(httpServletRequest); String query = httpServletRequest.getQueryString(); if (query != null) { if (HttpUtils.indexOfIngnoreCase(query , "wsdl2") > 0 || HttpUtils.indexOfIngnoreCase(query, "wsdl") > 0 || HttpUtils.indexOfIngnoreCase(query, "xsd") > 0 || HttpUtils.indexOfIngnoreCase(query, "policy") > 0) { processListService(httpServletRequest, httpServletResponse); } else { super.handle(httpServletRequest, httpServletResponse); } } else { super.handle(httpServletRequest, httpServletResponse); } }
/** * Callback method for index page. Forwards to {@link DEFAULT_INDEX_JSP} by default. * * @param httpServletRequest The incoming request. * @param httpServletResponse The outgoing response. */ protected void processIndex(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException { renderView(DEFAULT_INDEX_JSP, httpServletRequest, httpServletResponse); }
public AbstractAgent(ConfigurationContext aConfigContext) { configContext = aConfigContext; preloadMethods(); }