Interface RealmContextResolver
- All Known Implementing Classes:
DefaultRealmContextResolver,TestRealmContextResolver
public interface RealmContextResolver
An interface for resolving the realm context for a given request.
General implementation guidance:
Methods in this class should not block the calling thread. If the realm resolution process is blocking, it should be done in a separate thread.
In the case of an error during realm resolution, the CompletionStage should complete
exceptionally; methods should not throw exceptions directly.
The realm resolution takes place in the very early stages of the request processing pipeline, and before any authentication or authorization checks are performed. Implementations should be careful with the use of any blocking operations, as they may lead to performance issues or deadlocks, especially in public environments.
-
Method Summary
Modifier and TypeMethodDescriptionCompletionStage<org.apache.polaris.core.context.RealmContext> Resolves the realm context for the given request, and returns aCompletionStagethat completes with the resolved realm context.default CompletionStage<org.apache.polaris.core.context.RealmContext> Resolves the realm context for the given request, and returns aCompletionStagethat completes with the resolved realm context.
-
Method Details
-
resolveRealmContext
CompletionStage<org.apache.polaris.core.context.RealmContext> resolveRealmContext(String requestURL, String method, String path, Function<String, String> headers) Resolves the realm context for the given request, and returns aCompletionStagethat completes with the resolved realm context.- Returns:
- a
CompletionStagethat completes with the resolved realm context
-
resolveRealmContext
default CompletionStage<org.apache.polaris.core.context.RealmContext> resolveRealmContext(String requestURL, String method, String path, Map<String, String> headers) Resolves the realm context for the given request, and returns aCompletionStagethat completes with the resolved realm context.- Returns:
- a
CompletionStagethat completes with the resolved realm context
-