Class SseTransportAttachmentContext
java.lang.Object
com.soklet.SseTransportAttachmentContext
Framework-owned SSE attachment capability borrowed by one
SseServer.attach(SseTransportAttachmentContext, StartupContext)
invocation. The context itself must not be retained after that invocation
returns. Delegate attachment is unary, same-thread, and valid only during the
dynamic extent of the enclosing call.
The type is thread-safe so its immutable values can be read safely, but that does not relax the thread confinement or lifetime of the delegate-attachment methods. The request handler and termination signal obtained from this context may be retained for the attached runtime according to their individual contracts.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionattachTerminationOwningDelegate(@NonNull SseServer delegate, @NonNull SseServer.RequestHandler delegateRequestHandler) Attaches one independently terminating delegate child.attachTransparentDelegate(@NonNull SseServer delegate, @NonNull SseServer.RequestHandler delegateRequestHandler) Attaches one transparent delegate using this member's identity and exact termination signal.Returns the framework admission-fenced request handler.Acquires this transport member's framework-owned termination capability.
-
Method Details
-
getSokletConfig
- Returns:
- the configuration that owns this transport graph; the stable reference may be retained by the attached runtime
-
getAdmissionFencedRequestHandler
Returns the framework admission-fenced request handler. The attached runtime may retain and invoke it for that runtime's lifetime. While admission is open it dispatches to the application; before admission opens and after it is sealed, it completes the supplied result callback with a framework-marshaled HTTP 503 response instead of silently dropping the request.- Returns:
- the framework admission-fenced request handler
-
getTransportTerminationSignal
Acquires this transport member's framework-owned termination capability. The attached runtime may retain the signal afterattach(...)returns and must use it to report honest failure and termination evidence.- Returns:
- this member's termination signal
-
attachTransparentDelegate
@CheckReturnValue public @NonNull TransportRuntime attachTransparentDelegate(@NonNull SseServer delegate, @NonNull SseServer.RequestHandler delegateRequestHandler) Attaches one transparent delegate using this member's identity and exact termination signal. The delegate does not receive an independently terminating child member. The enclosing transport must return the delegate's runtime and must not drive a separate runtime or signal termination itself; the transparent delegate owns the shared member's lifecycle and signal.- Parameters:
delegate- delegate transportdelegateRequestHandler- handler supplied to the delegate- Returns:
- the exact runtime returned by the delegate
-
attachTerminationOwningDelegate
@CheckReturnValue public @NonNull TransportDelegateAttachment attachTerminationOwningDelegate(@NonNull SseServer delegate, @NonNull SseServer.RequestHandler delegateRequestHandler) Attaches one independently terminating delegate child. Soklet owns the child's completion state; the enclosing transport may observe the returned stage but cannot complete or otherwise mutate it.- Parameters:
delegate- delegate transportdelegateRequestHandler- handler supplied to the delegate- Returns:
- the child runtime and commit-gated subtree proof
-