This page is no longer updated - please visit http://ghostwire.com Thank you!
 

« PHPObject »
An Opensource Alternative to Flash Remoting
Current Release
Readme
Notes
Journal
Archives

Notes
Friday May 02, 2003

Aborting a remote task

The abortExecute() method and onAbort event were added in v1.4. The abortExecute() method allows you to "cancel" the current remote task. However, note that it is not really a cancellation - the remote task already sent will still complete its procedures and the server will still eventually send back a return message. If the task was sent to update a database, for example, this would still be done. The abortExecute() method only cause the incoming message, meant for the cancelled task, to be silently discarded (and therefore not affect the local object). The onAbort event is triggered when abortExecute is invoked.

The abortExecute() method is useful when a task is taking too long to return results, such as when using a slow web service. Or if the user of a search application changes his mind and wants to change his query terms. You can also use this to set up your own timeout procedure. I have noticed that sometimes the Internet is a strange thing. A connection might get jammed and take forever to return a result, but aborting the task and executing the same task again may get the results quickly (because the second connection doesn't get jammed).

Posted by sunny at May 2, 2003 11:46 AM

 

Comments

 

Post a comment









Remember personal info?







Zones



Forums