Skip to content

Commit

Permalink
Artifacts for 5.1.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kum-deepak committed Dec 9, 2018
1 parent c985766 commit 464892a
Show file tree
Hide file tree
Showing 70 changed files with 810 additions and 647 deletions.
365 changes: 173 additions & 192 deletions bundles/stomp.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundles/stomp.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundles/stomp.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundles/stomp.umd.min.js.map

Large diffs are not rendered by default.

72 changes: 48 additions & 24 deletions esm5/client.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ITransaction } from './i-transaction';
import { StompConfig } from './stomp-config';
import { StompHeaders } from './stomp-headers';
import { StompSubscription } from './stomp-subscription';
import { Transaction } from './transaction';
import { closeEventCallbackType, debugFnType, frameCallbackType, IPublishParams, messageCallbackType } from './types';
import { closeEventCallbackType, debugFnType, frameCallbackType, IPublishParams, messageCallbackType, wsErrorCallbackType } from './types';
import { Versions } from './versions';
/**
* STOMP Client Class.
Expand Down Expand Up @@ -88,21 +88,21 @@ export declare class Client {
* a request to [Client#unsubscribe]{@link Client#unsubscribe}
* from an endpoint.
*
* The actual {@link Message} will be passed as parameter to the callback.
* The actual {@link IMessage} will be passed as parameter to the callback.
*/
onUnhandledMessage: messageCallbackType;
/**
* STOMP brokers can be requested to notify when an operation is actually completed.
* Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}. See
* [Client#watchForReceipt]{@link Client#watchForReceipt} for examples.
*
* The actual {@link Frame} will be passed as parameter to the callback.
* The actual {@link FrameImpl} will be passed as parameter to the callback.
*/
onUnhandledReceipt: frameCallbackType;
/**
* Will be invoked if {@link Frame} of unknown type is received from the STOMP broker.
* Will be invoked if {@link FrameImpl} of unknown type is received from the STOMP broker.
*
* The actual {@link Frame} will be passed as parameter to the callback.
* The actual {@link FrameImpl} will be passed as parameter to the callback.
*/
onUnhandledFrame: frameCallbackType;
/**
Expand All @@ -114,23 +114,31 @@ export declare class Client {
*
* You can change options on the client, which will impact the immediate connect.
* It is valid to call [Client#decativate]{@link Client#deactivate} in this callback.
*
* As of version 5.1, this callback can be
* [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)
* (i.e., it can return a
* [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)).
* In that case connect will be called only after the Promise is resolved.
* This can be used to reliably fetch credentials, access token etc. from some other service
* in an asynchronous way.
*/
beforeConnect: () => void;
beforeConnect: () => void | Promise<void>;
/**
* Callback, invoked on every successful connection to the STOMP broker.
*
* The actual {@link Frame} will be passed as parameter to the callback.
* The actual {@link FrameImpl} will be passed as parameter to the callback.
* Sometimes clients will like to use headers from this frame.
*/
onConnect: frameCallbackType;
/**
* Callback, invoked on every successful disconnection from the STOMP broker. It will not be invoked if
* the STOMP broker disconnected due to an error.
*
* The actual Receipt {@link Frame} acknowledging the DISCONNECT will be passed as parameter to the callback.
* The actual Receipt {@link FrameImpl} acknowledging the DISCONNECT will be passed as parameter to the callback.
*
* The way STOMP protocol is designed, the connection may close/terminate without the client
* receiving the Receipt {@link Frame} acknowledging the DISCONNECT.
* receiving the Receipt {@link FrameImpl} acknowledging the DISCONNECT.
* You might find [Client#onWebSocketClose]{@link Client#onWebSocketClose} more appropriate to watch
* STOMP broker disconnects.
*/
Expand All @@ -140,7 +148,7 @@ export declare class Client {
* A compliant STOMP Broker will close the connection after this type of frame.
* Please check broker specific documentation for exact behavior.
*
* The actual {@link Frame} will be passed as parameter to the callback.
* The actual {@link FrameImpl} will be passed as parameter to the callback.
*/
onStompError: frameCallbackType;
/**
Expand All @@ -150,6 +158,22 @@ export declare class Client {
* is passed as parameter to the callback.
*/
onWebSocketClose: closeEventCallbackType;
/**
* Callback, invoked when underlying WebSocket raises an error.
*
* Actual [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}
* is passed as parameter to the callback.
*/
onWebSocketError: wsErrorCallbackType;
/**
* Set it to log the actual raw communication with the broker.
* When unset, it logs headers of the parsed frames.
*
* Change in this effects from next broker reconnect.
*
* **Caution: this assumes that frames only have valid UTF8 strings.**
*/
logRawCommunication: boolean;
/**
* By default, debug messages are discarded. To log to `console` following can be used:
*
Expand Down Expand Up @@ -257,7 +281,7 @@ export declare class Client {
* This method allow watching for a receipt and invoke the callback
* when corresponding receipt has been received.
*
* The actual {@link Frame} will be passed as parameter to the callback.
* The actual {@link FrameImpl} will be passed as parameter to the callback.
*
* Example:
* ```javascript
Expand All @@ -283,7 +307,7 @@ export declare class Client {
watchForReceipt(receiptId: string, callback: frameCallbackType): void;
/**
* Subscribe to a STOMP Broker location. The callback will be invoked for each received message with
* the {@link Message} as argument.
* the {@link IMessage} as argument.
*
* Note: The library will generate an unique ID if there is none provided in the headers.
* To use your own ID, pass it using the headers argument.
Expand Down Expand Up @@ -320,17 +344,17 @@ export declare class Client {
*/
unsubscribe(id: string, headers?: StompHeaders): void;
/**
* Start a transaction, the returned {@link Transaction} has methods - [commit]{@link Transaction#commit}
* and [abort]{@link Transaction#abort}.
* Start a transaction, the returned {@link ITransaction} has methods - [commit]{@link ITransaction#commit}
* and [abort]{@link ITransaction#abort}.
*
* `transactionId` is optional, if not passed the library will generate it internally.
*/
begin(transactionId?: string): Transaction;
begin(transactionId?: string): ITransaction;
/**
* Commit a transaction.
*
* It is preferable to commit a transaction by calling [commit]{@link Transaction#commit} directly on
* {@link Transaction} returned by [client.begin]{@link Client#begin}.
* It is preferable to commit a transaction by calling [commit]{@link ITransaction#commit} directly on
* {@link ITransaction} returned by [client.begin]{@link Client#begin}.
*
* ```javascript
* var tx = client.begin(txId);
Expand All @@ -341,8 +365,8 @@ export declare class Client {
commit(transactionId: string): void;
/**
* Abort a transaction.
* It is preferable to abort a transaction by calling [abort]{@link Transaction#abort} directly on
* {@link Transaction} returned by [client.begin]{@link Client#begin}.
* It is preferable to abort a transaction by calling [abort]{@link ITransaction#abort} directly on
* {@link ITransaction} returned by [client.begin]{@link Client#begin}.
*
* ```javascript
* var tx = client.begin(txId);
Expand All @@ -352,8 +376,8 @@ export declare class Client {
*/
abort(transactionId: string): void;
/**
* ACK a message. It is preferable to acknowledge a message by calling [ack]{@link Message#ack} directly
* on the {@link Message} handled by a subscription callback:
* ACK a message. It is preferable to acknowledge a message by calling [ack]{@link IMessage#ack} directly
* on the {@link IMessage} handled by a subscription callback:
*
* ```javascript
* var callback = function (message) {
Expand All @@ -366,8 +390,8 @@ export declare class Client {
*/
ack(messageId: string, subscriptionId: string, headers?: StompHeaders): void;
/**
* NACK a message. It is preferable to acknowledge a message by calling [nack]{@link Message#nack} directly
* on the {@link Message} handled by a subscription callback:
* NACK a message. It is preferable to acknowledge a message by calling [nack]{@link IMessage#nack} directly
* on the {@link IMessage} handled by a subscription callback:
*
* ```javascript
* var callback = function (message) {
Expand Down
Loading

0 comments on commit 464892a

Please sign in to comment.