Package dev.galasa.framework.api.common
Interface IRoute
- All Known Implementing Classes:
BaseRoute
public interface IRoute
IRoute provides methods for endpoints to implement when a request is sent through a servlet,
allowing for new routes to be added without needing servlets to know which route handles the request.
Route paths represent the regex patterns that are used to match request paths against.
-
Method Summary
Modifier and TypeMethodDescriptiongetPath()
javax.servlet.http.HttpServletResponse
handleDeleteRequest
(String pathInfo, QueryParameters queryParameters, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) javax.servlet.http.HttpServletResponse
handleGetRequest
(String pathInfo, QueryParameters queryParams, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) javax.servlet.http.HttpServletResponse
handlePostRequest
(String pathInfo, QueryParameters queryParameters, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) javax.servlet.http.HttpServletResponse
handlePutRequest
(String pathInfo, QueryParameters queryParameters, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
Method Details
-
getPath
Pattern getPath() -
handleGetRequest
javax.servlet.http.HttpServletResponse handleGetRequest(String pathInfo, QueryParameters queryParams, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException, FrameworkException - Throws:
javax.servlet.ServletException
IOException
FrameworkException
-
handlePutRequest
javax.servlet.http.HttpServletResponse handlePutRequest(String pathInfo, QueryParameters queryParameters, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException, FrameworkException - Throws:
javax.servlet.ServletException
IOException
FrameworkException
-
handlePostRequest
javax.servlet.http.HttpServletResponse handlePostRequest(String pathInfo, QueryParameters queryParameters, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException, FrameworkException - Throws:
javax.servlet.ServletException
IOException
FrameworkException
-
handleDeleteRequest
javax.servlet.http.HttpServletResponse handleDeleteRequest(String pathInfo, QueryParameters queryParameters, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException, FrameworkException - Throws:
javax.servlet.ServletException
IOException
FrameworkException
-