Class ControllerEntryPoint
java.lang.Object
com.blackrook.small.dispatch.DispatchEntryPoint<ControllerComponent>
com.blackrook.small.dispatch.controller.ControllerEntryPoint
- All Implemented Interfaces:
DispatchMVCEntryPoint<SmallResponse>
public class ControllerEntryPoint
extends DispatchEntryPoint<ControllerComponent>
implements DispatchMVCEntryPoint<SmallResponse>
Method descriptor class, specifically for controllers.
- Author:
- Matthew Tropiano
-
Nested Class Summary
Nested classes/interfaces inherited from class com.blackrook.small.dispatch.DispatchEntryPoint
DispatchEntryPoint.Source
-
Constructor Summary
ConstructorDescriptionControllerEntryPoint
(ControllerComponent controllerProfile, Method method) Creates an entry method around a service profile instance. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>[]
getPath()
handleCall
(RequestMethod requestMethod, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String, String> pathVariableMap, Map<String, javax.servlet.http.Cookie> cookieMap, HashDequeMap<String, Part> partMap) Handles an MVC call.boolean
Methods inherited from class com.blackrook.small.dispatch.DispatchEntryPoint
getMethod, getParameterDescriptors, getServiceProfile, getType, invoke, toString
-
Constructor Details
-
ControllerEntryPoint
Creates an entry method around a service profile instance.- Parameters:
controllerProfile
- the service instance.method
- the method invoked.
-
-
Method Details
-
getRequestMethods
- Returns:
- the request methods handled by this entry point.
-
getPath
- Returns:
- the full path of the entry method.
-
getMimeType
- Returns:
- the forced MIME type to use. If null, the dispatcher decides it.
-
getOutputType
- Returns:
- method's output type, if controller call.
-
isNoCache
public boolean isNoCache()- Returns:
- true, if a directive will be sent to the client to not cache the response data, false if not.
-
getFilterChain
- Returns:
- this method's full filter chain (package to controller to this method).
-
handleCall
public SmallResponse handleCall(RequestMethod requestMethod, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String, String> pathVariableMap, Map<String, throws InvocationTargetException, javax.servlet.ServletException, IOExceptionjavax.servlet.http.Cookie> cookieMap, HashDequeMap<String, Part> partMap) Description copied from interface:DispatchMVCEntryPoint
Handles an MVC call.- Specified by:
handleCall
in interfaceDispatchMVCEntryPoint<SmallResponse>
- Parameters:
requestMethod
- the incoming request method.request
- the HTTP request.response
- the HTTP response.pathVariableMap
- the path variable map.cookieMap
- the cookie map.partMap
- the map of name to multipart parts.- Returns:
- the return value.
- Throws:
InvocationTargetException
- if the underlying call throws an exception.NotFoundException
- if a file that was going to be sent does not exist.UnsupportedMediaTypeException
- if an incoming or outgoing type is unsupported.NoConverterException
- if an object could not be converted to a serializable format for transmission.javax.servlet.ServletException
- if any other servlet exception happens.UnsupportedEncodingException
- if an encoding type is not supported by this server.IOException
- if an IO Error occurs.
-