webstomp-obs
Version:
Stomp over websocket using observable
35 lines (34 loc) • 1.43 kB
TypeScript
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/multicast';
import 'rxjs/add/operator/finally';
import { IConnectedObservable } from './types';
import Frame from './frame';
import { ACK, AckHeaders, SendHeaders } from './headers';
export declare class ConnectedClient {
private connection;
private broadcastSubscribers;
private broadcastReceipterObservable;
private broadcastReceipterObserver;
private broadcastErrorObservable;
private broadcastErrorObserver;
private broadcastConnectionErrorObservable;
private broadcastConnectionErrorObserver;
constructor(connection: IConnectedObservable);
send: (destination: string, body?: string, headers?: SendHeaders) => void;
begin: (transaction?: string) => void;
commit: (transaction: string) => void;
abort: (transaction: string) => void;
ack: (messageID: string, subscription: string, headers?: AckHeaders) => void;
nack: (messageID: string, subscription: string, headers?: AckHeaders) => void;
receipt: () => Observable<Frame>;
connectionError: () => Observable<Frame>;
error: () => Observable<Frame>;
subscribe: (destination: string, headers?: {
id?: string;
ack?: ACK;
}) => Observable<Frame>;
subscribeBroadcast: (destination: string, headers?: {
id?: string;
ack?: ACK;
}) => Observable<Frame>;
}