Executes a single callback, handling continuation if it returns a Deferred. @param cb The callback to execute. @return true if the callback returned a Deferred and we switched to PAUSED, false otherwise and we didn't change state.
(final Callback cb)
| 1274 | * PAUSED, {@code false} otherwise and we didn't change state. |
| 1275 | */ |
| 1276 | @SuppressWarnings("unchecked") |
| 1277 | private boolean doCall(final Callback cb) { |
| 1278 | try { |
| 1279 | //LOG.debug("doCall(" + cb + '@' + cb.hashCode() + ')' + super.hashCode()); |
| 1280 | result = cb.call(result); |
| 1281 | } catch (Exception e) { |
| 1282 | result = e; |
| 1283 | } |
| 1284 | |
| 1285 | if (result instanceof Deferred) { |
| 1286 | handleContinuation((Deferred) result, cb); |
| 1287 | return true; |
| 1288 | } |
| 1289 | return false; |
| 1290 | } |
| 1291 | |
| 1292 | /** |
| 1293 | * Chains this Deferred with another one we need to wait on. |
no test coverage detected