Package com.oorian

Interface SseConnection

All Known Implementing Classes:
OorianSseConnection

public interface SseConnection
Abstracts a Server-Sent Events (SSE) connection for pushing updates to the client.

This interface decouples the framework from the specific SSE implementation, allowing the common library to send SSE messages without referencing servlet-specific types.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this SSE connection.
    boolean
    Returns whether this SSE connection is currently open.
    void
    sendJsonResponse(String jsonResponse)
    Sends a JSON response to the client via the SSE connection.
  • Method Details

    • sendJsonResponse

      void sendJsonResponse(String jsonResponse)
      Sends a JSON response to the client via the SSE connection.
      Parameters:
      jsonResponse - The JSON-encoded response string.
    • isOpen

      boolean isOpen()
      Returns whether this SSE connection is currently open.
      Returns:
      true if the connection is open, false otherwise.
    • close

      void close()
      Closes this SSE connection.