Package org.apache.sling.servlethelpers
Interface MockJakartaRequestDispatcherFactory
@ConsumerType
public interface MockJakartaRequestDispatcherFactory
Interface to create a mock
RequestDispatcher when calling the getRequestDispatcher methods
on MockSlingHttpServletRequest instances.-
Method Summary
Modifier and TypeMethodDescriptionjakarta.servlet.RequestDispatchergetRequestDispatcher(String path, org.apache.sling.api.request.RequestDispatcherOptions options) Get request dispatcher for given path.jakarta.servlet.RequestDispatchergetRequestDispatcher(org.apache.sling.api.resource.Resource resource, org.apache.sling.api.request.RequestDispatcherOptions options) Get request dispatcher for given resource.
-
Method Details
-
getRequestDispatcher
jakarta.servlet.RequestDispatcher getRequestDispatcher(String path, org.apache.sling.api.request.RequestDispatcherOptions options) Get request dispatcher for given path.- Parameters:
path- Pathoptions- Options. Null if no options are provided.- Returns:
- Request dispatcher
-
getRequestDispatcher
jakarta.servlet.RequestDispatcher getRequestDispatcher(org.apache.sling.api.resource.Resource resource, org.apache.sling.api.request.RequestDispatcherOptions options) Get request dispatcher for given resource.- Parameters:
resource- Resourceoptions- Options. Null if no options are provided.- Returns:
- Request dispatcher
-