UNPKG

3.71 kBTypeScriptView Raw
1import { StompHeaders } from './stomp-headers.js';
2import { ActivationState, closeEventCallbackType, debugFnType, frameCallbackType, messageCallbackType, wsErrorCallbackType } from './types.js';
3import { Versions } from './versions.js';
4/**
5 * Configuration options for STOMP Client, each key corresponds to
6 * field by the same name in {@link Client}. This can be passed to
7 * the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.
8 *
9 * Part of `@stomp/stompjs`.
10 */
11export declare class StompConfig {
12 /**
13 * See [Client#brokerURL]{@link Client#brokerURL}.
14 */
15 brokerURL?: string;
16 /**
17 * See [Client#stompVersions]{@link Client#stompVersions}.
18 */
19 stompVersions?: Versions;
20 /**
21 * See [Client#webSocketFactory]{@link Client#webSocketFactory}.
22 */
23 webSocketFactory?: () => any;
24 /**
25 * See [Client#connectionTimeout]{@link Client#connectionTimeout}.
26 */
27 connectionTimeout?: number;
28 /**
29 * See [Client#reconnectDelay]{@link Client#reconnectDelay}.
30 */
31 reconnectDelay?: number;
32 /**
33 * See [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}.
34 */
35 heartbeatIncoming?: number;
36 /**
37 * See [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
38 */
39 heartbeatOutgoing?: number;
40 /**
41 * See [Client#splitLargeFrames]{@link Client#splitLargeFrames}.
42 */
43 splitLargeFrames?: boolean;
44 /**
45 * See [Client#forceBinaryWSFrames]{@link Client#forceBinaryWSFrames}.
46 */
47 forceBinaryWSFrames?: boolean;
48 /**
49 * See [Client#appendMissingNULLonIncoming]{@link Client#appendMissingNULLonIncoming}.
50 */
51 appendMissingNULLonIncoming?: boolean;
52 /**
53 * See [Client#maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.
54 */
55 maxWebSocketChunkSize?: number;
56 /**
57 * See [Client#connectHeaders]{@link Client#connectHeaders}.
58 */
59 connectHeaders?: StompHeaders;
60 /**
61 * See [Client#disconnectHeaders]{@link Client#disconnectHeaders}.
62 */
63 disconnectHeaders?: StompHeaders;
64 /**
65 * See [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
66 */
67 onUnhandledMessage?: messageCallbackType;
68 /**
69 * See [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
70 */
71 onUnhandledReceipt?: frameCallbackType;
72 /**
73 * See [Client#onUnhandledFrame]{@link Client#onUnhandledFrame}.
74 */
75 onUnhandledFrame?: frameCallbackType;
76 /**
77 * See [Client#beforeConnect]{@link Client#beforeConnect}.
78 */
79 beforeConnect?: () => void | Promise<void>;
80 /**
81 * See [Client#onConnect]{@link Client#onConnect}.
82 */
83 onConnect?: frameCallbackType;
84 /**
85 * See [Client#onDisconnect]{@link Client#onDisconnect}.
86 */
87 onDisconnect?: frameCallbackType;
88 /**
89 * See [Client#onStompError]{@link Client#onStompError}.
90 */
91 onStompError?: frameCallbackType;
92 /**
93 * See [Client#onWebSocketClose]{@link Client#onWebSocketClose}.
94 */
95 onWebSocketClose?: closeEventCallbackType;
96 /**
97 * See [Client#onWebSocketError]{@link Client#onWebSocketError}.
98 */
99 onWebSocketError?: wsErrorCallbackType;
100 /**
101 * See [Client#logRawCommunication]{@link Client#logRawCommunication}.
102 */
103 logRawCommunication?: boolean;
104 /**
105 * See [Client#debug]{@link Client#debug}.
106 */
107 debug?: debugFnType;
108 /**
109 * See [Client#discardWebsocketOnCommFailure]{@link Client#discardWebsocketOnCommFailure}.
110 */
111 discardWebsocketOnCommFailure?: boolean;
112 /**
113 * See [Client#onChangeState]{@link Client#onChangeState}.
114 */
115 onChangeState?: (state: ActivationState) => void;
116}