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

public class DispatchEntryPoint<S extends DispatchComponent> extends Object
Entry method descriptor class. Parses a method's characteristics using reflection, yielding a digest of its important contents.
Author:
Matthew Tropiano
  • Constructor Details

    • DispatchEntryPoint

      public DispatchEntryPoint(S componentInstance, Method method)
      Creates an entry method around a service profile instance.
      Parameters:
      componentInstance - the service instance.
      method - the method invoked.
  • Method Details

    • getMethod

      public Method getMethod()
      Returns:
      actual method that this describes.
    • getType

      public Class<?> getType()
      Returns:
      method's return type.
    • getParameterDescriptors

      public com.blackrook.small.dispatch.DispatchEntryPoint.ParameterDescriptor[] getParameterDescriptors()
      Returns:
      method's parameter info.
    • getServiceProfile

      public S 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,javax.servlet.http.Cookie> cookieMap, HashDequeMap<String,Part> partMap) throws InvocationTargetException, javax.servlet.ServletException, IOException
      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

      public String toString()
      Overrides:
      toString in class Object