Package com.blackrook.small.dispatch
Class DispatchEntryPoint<S extends DispatchComponent>
java.lang.Object
com.blackrook.small.dispatch.DispatchEntryPoint<S>
- Type Parameters:
S- The entry point type.
- Direct Known Subclasses:
ControllerEntryPoint,FilterEntryPoint,FilterExitPoint
Entry method descriptor class.
Parses a method's characteristics using reflection, yielding a digest of its important contents.
- Author:
- Matthew Tropiano
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDispatchEntryPoint(S componentInstance, Method method) Creates an entry method around a service profile instance. -
Method Summary
Modifier and TypeMethodDescriptioncom.blackrook.small.dispatch.DispatchEntryPoint.ParameterDescriptor[]Gets the service profile that this belongs to.Class<?>getType()protected Objectinvoke(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) toString()
-
Constructor Details
-
DispatchEntryPoint
Creates an entry method around a service profile instance.- Parameters:
componentInstance- the service instance.method- the method invoked.
-
-
Method Details
-
getMethod
- Returns:
- actual method that this describes.
-
getType
- Returns:
- method's return type.
-
getParameterDescriptors
public com.blackrook.small.dispatch.DispatchEntryPoint.ParameterDescriptor[] getParameterDescriptors()- Returns:
- method's parameter info.
-
getServiceProfile
Gets the service profile that this belongs to.- Returns:
- the service profile.
-
invoke
protected Object invoke(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) - 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 function's return value.
- Throws:
UnsupportedMediaTypeException- if an incoming or outgoing type is unsupported.NoConverterException- if an object could not be converted to a serializable format for transmission.ClassCastException- if a value could not be converted to another type.BeanCreationException- if a bean cannot be instantiated for any reason on the application, session, or request scope.UnsupportedEncodingException- if an encoding type is not supported by this server.InvocationTargetException- if the underlying call throws an exception.javax.servlet.ServletException- if any other servlet exception happens.IOException- if an IO Error occurs.
-
toString
-