Package private way of making an RPC complete by giving it its result. If this RPC has no Deferred associated to it, nothing will happen. This may happen if the RPC was already called back. Once this call to this method completes, this object can be re-used to re-send the same RPC, prov
(final Object result)
| 705 | * RPC to be in-flight (guaranteeing this may be hard in error cases). |
| 706 | */ |
| 707 | final void callback(final Object result) { |
| 708 | if (timeout_handle != null) { |
| 709 | timeout_handle.cancel(); |
| 710 | timeout_task = null; |
| 711 | timeout_handle = null; |
| 712 | } |
| 713 | |
| 714 | final Deferred<Object> d = deferred; |
| 715 | if (d == null) { |
| 716 | return; |
| 717 | } |
| 718 | deferred = null; |
| 719 | attempt = 0; |
| 720 | d.callback(result); |
| 721 | } |
| 722 | |
| 723 | /** Checks whether or not this RPC has a Deferred without creating one. */ |
| 724 | final boolean hasDeferred() { |
no outgoing calls
no test coverage detected