Transaction.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>The source code</title>
  6. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  7. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  8. <style type="text/css">
  9. .highlight { display: block; background-color: #ddd; }
  10. </style>
  11. <script type="text/javascript">
  12. function highlight() {
  13. document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
  14. }
  15. </script>
  16. </head>
  17. <body onload="prettyPrint(); highlight();">
  18. <pre class="prettyprint lang-js"><span id='Ext-direct-Transaction'>/**
  19. </span> * Supporting Class for Ext.Direct (not intended to be used directly).
  20. */
  21. Ext.define('Ext.direct.Transaction', {
  22. /* Begin Definitions */
  23. alias: 'direct.transaction',
  24. alternateClassName: 'Ext.Direct.Transaction',
  25. statics: {
  26. TRANSACTION_ID: 0
  27. },
  28. /* End Definitions */
  29. <span id='Ext-direct-Transaction-method-constructor'> /**
  30. </span> * Creates new Transaction.
  31. * @param {Object} [config] Config object.
  32. */
  33. constructor: function(config){
  34. var me = this;
  35. Ext.apply(me, config);
  36. me.id = me.tid = ++me.self.TRANSACTION_ID;
  37. me.retryCount = 0;
  38. },
  39. send: function(){
  40. this.provider.queueTransaction(this);
  41. },
  42. retry: function(){
  43. this.retryCount++;
  44. this.send();
  45. },
  46. getProvider: function(){
  47. return this.provider;
  48. }
  49. });
  50. </pre>
  51. </body>
  52. </html>