messengercustom-servicesmacoslinuxwindowsinboxwhatsappicloudtweetdeckhipchattelegramhangoutsslackgmailskypefacebook-workplaceoutlookemailmicrosoft-teamsdiscord
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
927 B
46 lines
927 B
9 years ago
|
/**
|
||
|
* Supporting Class for Ext.Direct (not intended to be used directly).
|
||
|
*/
|
||
|
Ext.define('Ext.direct.Transaction', {
|
||
|
alias: 'direct.transaction',
|
||
|
alternateClassName: 'Ext.Direct.Transaction',
|
||
|
|
||
|
statics: {
|
||
|
TRANSACTION_ID: 0
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* @cfg {Ext.direct.Provider} provider Provider to use with this Transaction.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* Creates new Transaction.
|
||
|
* @param {Object} [config] Config object.
|
||
|
*/
|
||
|
constructor: function(config) {
|
||
|
var me = this;
|
||
|
|
||
|
Ext.apply(me, config);
|
||
|
|
||
|
me.id = me.tid = ++me.self.TRANSACTION_ID;
|
||
|
me.retryCount = 0;
|
||
|
},
|
||
|
|
||
|
send: function() {
|
||
|
var me = this;
|
||
|
|
||
|
me.provider.queueTransaction(me);
|
||
|
},
|
||
|
|
||
|
retry: function() {
|
||
|
var me = this;
|
||
|
|
||
|
me.retryCount++;
|
||
|
me.send();
|
||
|
},
|
||
|
|
||
|
getProvider: function() {
|
||
|
return this.provider;
|
||
|
}
|
||
|
});
|