UNPKG

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