Class McpTaskRequestContext
java.lang.Object
com.soklet.McpTaskRequestContext
Immutable input to a task lookup or cancelation-intent request.
The request has already passed Soklet's structural validation and admission pipeline. A task manager must still use the admitted identity, selected endpoint, and its application-owned task binding to authorize the operation atomically. Possession of the task ID is not authorization.
Instances intentionally retain reference identity. The nested request context represents one independently admitted invocation and may carry application principal and context objects; structurally equal-looking carriers must not be treated as the same authorization decision.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull McpTaskRequestContextfromComponents(@NonNull McpRequestContext requestContext, @NonNull String taskId) Creates a task-request context from its components.
-
Method Details
-
fromComponents
public static @NonNull McpTaskRequestContext fromComponents(@NonNull McpRequestContext requestContext, @NonNull String taskId) Creates a task-request context from its components.This factory is useful for exercising application-provided task managers in isolation; Soklet constructs the authoritative contexts used for live requests.
- Parameters:
requestContext- request context to supply to the task managertaskId- nonblank task identifier without carriage-return or newline characters- Returns:
- immutable task-request context
- Throws:
NullPointerException- if an argument is nullIllegalArgumentException- if the task ID is blank or contains a carriage-return or newline character
-
getRequestContext
- Returns:
- independently admitted current request
-
getTaskId
-