High-level API for sending Server-Sent Events (SSE) to clients connected to a repository app, without the caller needing to manage connections or message routing directly. A caller builds a message with newSseMessage(), builds a Filter with newFilter() describing which connected clients should receive it, then calls send() to broadcast the message. Filters target clients by SSE connection type and can be narrowed further by content id, profile id, or an arbitrary attribute name and value.
Group: Managers
Methods
newSseMessage()
Returns: Builder
Creates a new SSE message builder for constructing structured messages.
newFilter(String type)
Returns: Filter
Creates a new filter for targeting specific groups of SSE clients, scoped to the current request's hostname.
| Parameter | Description |
|---|---|
type | the SSE connection type to target |
send(Filter filter, SseEventMessage message)
Returns: void
Sends a structured SSE message to clients matching the specified filter.
| Parameter | Description |
|---|---|
filter | the targeting filter specifying which clients should receive the message |
message | the structured SSE message to send |
send(Filter filter, String rawMessage)
Returns: void
Sends a raw string message to clients matching the specified filter.
| Parameter | Description |
|---|---|
filter | the targeting filter specifying which clients should receive the message |
rawMessage | the raw string to send, which should already be properly SSE-formatted |