Completes this operation exceptionally. Registered callbacks are invoked and provided the given throwable as the cause of failure. @param failureCause the cause of failure
(Status failureCause)
| 146 | * @param failureCause the cause of failure |
| 147 | */ |
| 148 | public void failed(Status failureCause) { |
| 149 | Map<ClientTransport.PingCallback, Executor> callbacks; |
| 150 | synchronized (this) { |
| 151 | if (completed) { |
| 152 | return; |
| 153 | } |
| 154 | completed = true; |
| 155 | this.failureCause = failureCause; |
| 156 | callbacks = this.callbacks; |
| 157 | this.callbacks = null; |
| 158 | } |
| 159 | for (Map.Entry<ClientTransport.PingCallback, Executor> entry : callbacks.entrySet()) { |
| 160 | notifyFailed(entry.getKey(), entry.getValue(), failureCause); |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | /** |
| 165 | * Notifies the given callback that the ping operation failed. |
no test coverage detected