Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
otm:ordering_of_messages:discard_early [2011/06/27 08:47] aspectscript |
otm:ordering_of_messages:discard_early [2012/02/06 22:49] (current) aspectscript |
||
|---|---|---|---|
| Line 16: | Line 16: | ||
| </ | </ | ||
| - | The Discard Early strategy is implemented as a TM advice, which is a JavaScript function, that is executed every time the response is retrieved: | + | The Discard Early strategy is implemented as a piece of advice, which is a JavaScript function, that is executed every time a server |
| <code javascript> | <code javascript> | ||
| Line 22: | Line 22: | ||
| if(!this.isEarly(jp)){ | if(!this.isEarly(jp)){ | ||
| jp.proceed(); | jp.proceed(); | ||
| - | | + | this.idServerRespExpected = request.idServerResp + 1; |
| } | } | ||
| } | } | ||
| Line 28: | Line 28: | ||
| var discardEarlyCallback = function(callback) { | var discardEarlyCallback = function(callback) { | ||
| return function(jp, | return function(jp, | ||
| - | | + | |
| var request = jp.target; | var request = jp.target; | ||
| //Is it discarded? | //Is it discarded? | ||