code: private DispatcherType getDispatcherType(final HttpServletRewrite event)
     {
        for (DispatcherTypeProvider provider : getDispatcherTypeProviders()) {
           DispatcherType dispatcherType = provider.getDispatcherType(event.getRequest(), event.getServletContext());
           if (dispatcherType != null) {
              return dispatcherType;
           }
        }
        throw new IllegalStateException("Unable to determine dispatcher type of current request");
     }
docs: Determines the {@link DispatcherType} of the current request using the {@link DispatcherTypeProvider} SPI.