org.springframework.web.servlet.mvc.Controller Java Examples

The following examples show how to use org.springframework.web.servlet.mvc.Controller. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KSBDispatcherServlet.java    From rice with Educational Community License v2.0 5 votes vote down vote up
@Override
protected HandlerAdapter getHandlerAdapter(Object handler) throws ServletException {
	if (handler instanceof HttpRequestHandler) {
		return new HttpRequestHandlerAdapter();
	} else if (handler instanceof Controller) {
		Object unwrappedHandler = ClassLoaderUtils.unwrapFromProxy(handler);
		if (unwrappedHandler instanceof CXFServletControllerAdapter) {
			// TODO this just seems weird as this controller is initially null when it's created, does there need to be some synchronization here?
			((CXFServletControllerAdapter)unwrappedHandler).setController(cxfServletController);
		}			
		return new SimpleControllerHandlerAdapter();
	}
	throw new RiceRuntimeException("handler of type " + handler.getClass().getName() + " is not known and can't be used by " + KSBDispatcherServlet.class.getName());
}
 
Example #2
Source File: ControllerTypePredicate.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public boolean isControllerType(Class<?> beanClass) {
	return Controller.class.isAssignableFrom(beanClass);
}
 
Example #3
Source File: ControllerTypePredicate.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
public boolean isControllerType(Class<?> beanClass) {
	return Controller.class.isAssignableFrom(beanClass);
}
 
Example #4
Source File: HttpProxyFilter.java    From engine with GNU General Public License v3.0 4 votes vote down vote up
public HttpProxyFilter(boolean enabled, Controller proxyController) {
    this.enabled = enabled;
    this.proxyController = proxyController;
}