Module ch.ralscha.extdirectspring
Class RouterController
java.lang.Object
ch.ralscha.extdirectspring.controller.RouterController
Main router controller that handles polling, form handler and normal Ext Direct calls.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.springframework.http.MediaTypestatic final org.springframework.http.MediaType -
Constructor Summary
ConstructorsConstructorDescriptionRouterController(org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter handlerAdapter, ConfigurationService configurationService, MethodInfoCache methodInfoCache) -
Method Summary
Modifier and TypeMethodDescriptionvoidpoll(String beanName, String method, String event, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Locale locale) router(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String extAction, String extMethod) voidrouter(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Locale locale) voidwriteJsonResponse(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object responseObject, Class<?> jsonView) voidwriteJsonResponse(jakarta.servlet.http.HttpServletResponse response, Object responseObject, Class<?> jsonView, boolean streamResponse, boolean isMultipart)
-
Field Details
-
APPLICATION_JSON
public static final org.springframework.http.MediaType APPLICATION_JSON -
TEXT_HTML
public static final org.springframework.http.MediaType TEXT_HTML
-
-
Constructor Details
-
RouterController
@Autowired public RouterController(org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter handlerAdapter, ConfigurationService configurationService, MethodInfoCache methodInfoCache)
-
-
Method Details
-
poll
@RequestMapping("/poll/{beanName}/{method}/{event}") public void poll(@PathVariable("beanName") String beanName, @PathVariable("method") String method, @PathVariable("event") String event, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Locale locale) throws Exception - Throws:
Exception
-
router
@RequestMapping(value="/router", method=POST, params="extAction") public String router(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @RequestParam("extAction") String extAction, @RequestParam("extMethod") String extMethod) throws IOException - Throws:
IOException
-
router
@RequestMapping(value="/router", method=POST, params="!extAction", consumes="application/json") public void router(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Locale locale) throws IOException - Throws:
IOException
-
writeJsonResponse
public void writeJsonResponse(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object responseObject, Class<?> jsonView) throws IOException - Throws:
IOException
-
writeJsonResponse
public void writeJsonResponse(jakarta.servlet.http.HttpServletResponse response, Object responseObject, Class<?> jsonView, boolean streamResponse, boolean isMultipart) throws IOException - Throws:
IOException
-