Package org.angular.ts.ng
Interface ConnectionConfig
@JsType(isNative=true,
name="ng.ConnectionConfig",
namespace="<global>")
public interface ConnectionConfig
Public AngularTS ConnectionConfig contract exposed through the global ng namespace for Closure-annotated applications.
-
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 ConnectionConfigcreate()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 happensdoubleDelay between reconnect attempts in millisecondsFunction to transform incoming messagesvoidsetEventTypes(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 attemptsvoidCalled when a WebSocket connection closesvoidCalled when an error occursvoidCalled with every registered connection message, including custom SSE event typesvoidsetOnMessage(ConnectionConfig.OnMessageCallback onMessage) Called when a message is receivedvoidCalled when the connection opensvoidsetOnReconnect(ConnectionConfig.OnReconnectCallback onReconnect) Called when a reconnect attempt happensvoidsetRetryDelay(double retryDelay) Delay between reconnect attempts in millisecondsvoidsetTransformMessage(ConnectionConfig.TransformMessageCallback transformMessage) Function to transform incoming messages
-
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 -
getRetryDelay
@JsProperty double getRetryDelay()Delay between reconnect attempts in milliseconds -
getTransformMessage
Function to transform incoming messages -
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 -
setRetryDelay
@JsProperty void setRetryDelay(double retryDelay) Delay between reconnect attempts in milliseconds -
setTransformMessage
Function to transform incoming messages
-