Interface SseConfig


@JsType(isNative=true, name="ng.SseConfig", namespace="<global>") public interface SseConfig
SSE-specific configuration
  • Method Details

    • create

      @JsOverlay static SseConfig create()
    • getEventTypes

      @JsProperty elemental2.core.JsArray<String> getEventTypes()
      Additional EventSource event names to subscribe to
    • getHeartbeatTimeout

      @JsProperty double getHeartbeatTimeout()
      Timeout in milliseconds to detect heartbeat inactivity
    • getMaxRetries

      @JsProperty double getMaxRetries()
      Maximum number of reconnect attempts
    • getOnClose

      @JsProperty SseConfig.OnCloseCallback getOnClose()
      Called when a WebSocket connection closes
    • getOnError

      @JsProperty SseConfig.OnErrorCallback getOnError()
      Called when an error occurs
    • getOnEvent

      @JsProperty SseConfig.OnEventCallback getOnEvent()
      Called with every registered connection message, including custom SSE event types
    • getOnMessage

      @JsProperty SseConfig.OnMessageCallback getOnMessage()
      Called when a message is received
    • getOnOpen

      @JsProperty SseConfig.OnOpenCallback getOnOpen()
      Called when the connection opens
    • getOnReconnect

      @JsProperty SseConfig.OnReconnectCallback getOnReconnect()
      Called when a reconnect attempt happens
    • getParams

      @JsProperty jsinterop.base.JsPropertyMap<Object> getParams()
      Optional query parameters appended to the URL
    • getRetryDelay

      @JsProperty double getRetryDelay()
      Delay between reconnect attempts in milliseconds
    • getTransformMessage

      @JsProperty SseConfig.TransformMessageCallback getTransformMessage()
      Function to transform incoming messages
    • isWithCredentials

      @JsProperty boolean isWithCredentials()
      Include cookies/credentials when connecting
    • setEventTypes

      @JsProperty void setEventTypes(elemental2.core.JsArray<String> eventTypes)
      Additional EventSource event names to subscribe to
    • setHeartbeatTimeout

      @JsProperty void setHeartbeatTimeout(double heartbeatTimeout)
      Timeout in milliseconds to detect heartbeat inactivity
    • setMaxRetries

      @JsProperty void setMaxRetries(double maxRetries)
      Maximum number of reconnect attempts
    • setOnClose

      @JsProperty void setOnClose(SseConfig.OnCloseCallback onClose)
      Called when a WebSocket connection closes
    • setOnError

      @JsProperty void setOnError(SseConfig.OnErrorCallback onError)
      Called when an error occurs
    • setOnEvent

      @JsProperty void setOnEvent(SseConfig.OnEventCallback onEvent)
      Called with every registered connection message, including custom SSE event types
    • setOnMessage

      @JsProperty void setOnMessage(SseConfig.OnMessageCallback onMessage)
      Called when a message is received
    • setOnOpen

      @JsProperty void setOnOpen(SseConfig.OnOpenCallback onOpen)
      Called when the connection opens
    • setOnReconnect

      @JsProperty void setOnReconnect(SseConfig.OnReconnectCallback onReconnect)
      Called when a reconnect attempt happens
    • setParams

      @JsProperty void setParams(jsinterop.base.JsPropertyMap<Object> params)
      Optional query parameters appended to the URL
    • setRetryDelay

      @JsProperty void setRetryDelay(double retryDelay)
      Delay between reconnect attempts in milliseconds
    • setTransformMessage

      @JsProperty void setTransformMessage(SseConfig.TransformMessageCallback transformMessage)
      Function to transform incoming messages
    • setWithCredentials

      @JsProperty void setWithCredentials(boolean withCredentials)
      Include cookies/credentials when connecting