Package org.angular.ts.ng
Interface SseConfig
@JsType(isNative=true,
name="ng.SseConfig",
namespace="<global>")
public interface SseConfig
SSE-specific configuration
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceTypeScript callback contract for this property.static interfaceTypeScript callback contract for this property.static interfaceTypeScript callback contract for this property.static interfaceTypeScript callback contract for this property.static interfaceTypeScript callback contract for this property.static interfaceTypeScript callback contract for this property.static interfaceTypeScript callback contract for this property. -
Method Summary
Modifier and TypeMethodDescriptionstatic SseConfigcreate()elemental2.core.JsArray<String> Additional EventSource event names to subscribe todoubleTimeout in milliseconds to detect heartbeat inactivitydoubleMaximum number of reconnect attemptsCalled when a WebSocket connection closesCalled when an error occursCalled with every registered connection message, including custom SSE event typesCalled when a message is receivedCalled when the connection opensCalled when a reconnect attempt happensjsinterop.base.JsPropertyMap<Object> Optional query parameters appended to the URLdoubleDelay between reconnect attempts in millisecondsFunction to transform incoming messagesbooleanInclude cookies/credentials when connectingvoidsetEventTypes(elemental2.core.JsArray<String> eventTypes) Additional EventSource event names to subscribe tovoidsetHeartbeatTimeout(double heartbeatTimeout) Timeout in milliseconds to detect heartbeat inactivityvoidsetMaxRetries(double maxRetries) Maximum number of reconnect attemptsvoidsetOnClose(SseConfig.OnCloseCallback onClose) Called when a WebSocket connection closesvoidsetOnError(SseConfig.OnErrorCallback onError) Called when an error occursvoidsetOnEvent(SseConfig.OnEventCallback onEvent) Called with every registered connection message, including custom SSE event typesvoidsetOnMessage(SseConfig.OnMessageCallback onMessage) Called when a message is receivedvoidsetOnOpen(SseConfig.OnOpenCallback onOpen) Called when the connection opensvoidsetOnReconnect(SseConfig.OnReconnectCallback onReconnect) Called when a reconnect attempt happensvoidOptional query parameters appended to the URLvoidsetRetryDelay(double retryDelay) Delay between reconnect attempts in millisecondsvoidsetTransformMessage(SseConfig.TransformMessageCallback transformMessage) Function to transform incoming messagesvoidsetWithCredentials(boolean withCredentials) Include cookies/credentials when connecting
-
Method Details
-
create
-
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
Called when a WebSocket connection closes -
getOnError
Called when an error occurs -
getOnEvent
Called with every registered connection message, including custom SSE event types -
getOnMessage
Called when a message is received -
getOnOpen
Called when the connection opens -
getOnReconnect
Called when a reconnect attempt happens -
getParams
Optional query parameters appended to the URL -
getRetryDelay
@JsProperty double getRetryDelay()Delay between reconnect attempts in milliseconds -
getTransformMessage
Function to transform incoming messages -
isWithCredentials
@JsProperty boolean isWithCredentials()Include cookies/credentials when connecting -
setEventTypes
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
Called when a WebSocket connection closes -
setOnError
Called when an error occurs -
setOnEvent
Called with every registered connection message, including custom SSE event types -
setOnMessage
Called when a message is received -
setOnOpen
Called when the connection opens -
setOnReconnect
Called when a reconnect attempt happens -
setParams
Optional query parameters appended to the URL -
setRetryDelay
@JsProperty void setRetryDelay(double retryDelay) Delay between reconnect attempts in milliseconds -
setTransformMessage
Function to transform incoming messages -
setWithCredentials
@JsProperty void setWithCredentials(boolean withCredentials) Include cookies/credentials when connecting
-