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.

ParameterDescription
typethe SSE connection type to target

send(Filter filter, SseEventMessage message)

Returns: void

Sends a structured SSE message to clients matching the specified filter.

ParameterDescription
filterthe targeting filter specifying which clients should receive the message
messagethe structured SSE message to send

send(Filter filter, String rawMessage)

Returns: void

Sends a raw string message to clients matching the specified filter.

ParameterDescription
filterthe targeting filter specifying which clients should receive the message
rawMessagethe raw string to send, which should already be properly SSE-formatted
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.