public interface CustomResourceHandler
A custom API resource handler. Handles custom resources.
- Author:
- Alex Bogdanovski [alex@erudika.com]
-
Method Summary
Modifier and TypeMethodDescriptionThe relative path of the custom resource.jakarta.ws.rs.core.Response
handleDelete
(jakarta.ws.rs.container.ContainerRequestContext ctx) This method is called when a DELETE request to be handled.jakarta.ws.rs.core.Response
handleGet
(jakarta.ws.rs.container.ContainerRequestContext ctx) This method is called when a GET request to be handled.jakarta.ws.rs.core.Response
handlePatch
(jakarta.ws.rs.container.ContainerRequestContext ctx) This method is called when a PATCH request to be handled.jakarta.ws.rs.core.Response
handlePost
(jakarta.ws.rs.container.ContainerRequestContext ctx) This method is called when a POST request to be handled.jakarta.ws.rs.core.Response
handlePut
(jakarta.ws.rs.container.ContainerRequestContext ctx) This method is called when a PUT request to be handled.
-
Method Details
-
getRelativePath
String getRelativePath()The relative path of the custom resource.- Returns:
- any string (Jersey path parameters are allowed)
-
handleGet
jakarta.ws.rs.core.Response handleGet(jakarta.ws.rs.container.ContainerRequestContext ctx) This method is called when a GET request to be handled.- Parameters:
ctx
- the context object - contains all the details of the request and context- Returns:
- a response
-
handlePost
jakarta.ws.rs.core.Response handlePost(jakarta.ws.rs.container.ContainerRequestContext ctx) This method is called when a POST request to be handled.- Parameters:
ctx
- the context object - contains all the details of the request and context- Returns:
- a response
-
handlePatch
jakarta.ws.rs.core.Response handlePatch(jakarta.ws.rs.container.ContainerRequestContext ctx) This method is called when a PATCH request to be handled.- Parameters:
ctx
- the context object - contains all the details of the request and context- Returns:
- a response
-
handlePut
jakarta.ws.rs.core.Response handlePut(jakarta.ws.rs.container.ContainerRequestContext ctx) This method is called when a PUT request to be handled.- Parameters:
ctx
- the context object - contains all the details of the request and context- Returns:
- a response
-
handleDelete
jakarta.ws.rs.core.Response handleDelete(jakarta.ws.rs.container.ContainerRequestContext ctx) This method is called when a DELETE request to be handled.- Parameters:
ctx
- the context object - contains all the details of the request and context- Returns:
- a response
-