Interface ResourceMethodResolver
- All Known Implementing Classes:
DefaultResourceMethodResolver
public interface ResourceMethodResolver
Contract for matching incoming HTTP requests with appropriate Resource Methods (Java methods to invoke to handle requests).
Soklet's default implementation of this type, DefaultResourceMethodResolver, is sufficient for most applications.
However, should a custom implementation be necessary for your application, documentation is available at https://www.soklet.com/docs/request-handling#resource-method-resolution.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionVends the set of all Resource Methods registered in the system.resourceMethodForRequest(Request request) Given an HTTP request, provide a matching Resource Method to invoke.
-
Method Details
-
resourceMethodForRequest
Given an HTTP request, provide a matching Resource Method to invoke.An unmatched Resource Method generally indicates an
HTTP 404.- Parameters:
request- the HTTP request- Returns:
- the matching Resource Method, or
Optional.empty()if no match was found
-
getResourceMethods
Vends the set of all Resource Methods registered in the system.- Returns:
- the set of all Resource Methods in the system
-