Class CKRequestProvider
java.lang.Object
ai.codekarma.CKRequestProvider
Entry point for request lifecycle tracking in applications using this SDK.
Call startAndGet(...) at the start of each inbound request to obtain a
CKRequestHandler. Use the handler throughout the request to report the final
route and HTTP status. Any headers returned by handler methods must be forwarded in
the outgoing response.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CKRequestHandlerstartAndGet(String requestMethod, Map<String, String> headers) Starts tracking a request lifecycle and returns a handler for subsequent updates.
-
Constructor Details
-
CKRequestProvider
public CKRequestProvider()
-
-
Method Details
-
startAndGet
Starts tracking a request lifecycle and returns a handler for subsequent updates.Call this once at the beginning of request handling, before any routing or business logic. Use the returned
CKRequestHandlerto report the resolved route and final HTTP status. Apply any headers returned by handler methods to the outgoing response.- Parameters:
requestMethod- HTTP method of the inbound request, such asGETorPOSTheaders- inbound request headers as key-value pairs- Returns:
- handler used to report route updates and complete the request lifecycle
-