Extending ClientEngine.js to keep polling alive after periodic network failures

The Question: Is there a way to extend functions in ClientEngine.js to customize behavior (specifically for EchoAsyncMonitor.invalidResponseHandler) without changing ClientEngine.js file directly? If so, can you point me in the right direction?

The Problem: I have written a monitoring application that uses Echo2. As changes occur on the server (process start/stop/crash), I use the TaskQueue mechanism to keep the client polling the server every 5 seconds. However... if there is any kind of a network glitch causing one of the sync calls to fail, the alarm dialog goes up, and the polling will stop. This is bad, becauls if they just hit "OK', the dialog box goes away, and everything looks like it's just fine.. but status is not updated, and eventually, the HTTP session will time out. They will only find that out when they hit a button.

I want it to restart the polling timer in the event of an error (call EchoAsyncMonitor.start, or EchoServerMessage.processAsyncConfig again).

I don’t want to hack the ClientEngine.js file directly. That just seems wrong, and un-maintainable. Is there a more formal and elegant option?

/**
 * Processes an invalid response to the poll request.
 */
EchoAsyncMonitor.invalidResponseHandler = function() {
    alert("Invalid response from server to asynchronous polling connection.");
    // Keep trying.. never give up!
    EchoAsyncMonitor.start();
};

This works, but makes me ill to think about maintaining a the ClientEngine.js file that is burried deep in the bowels of Echo2Renderer.jar.

Cheers,

Jokichi