Resolve a specific future by messageHash. Removes it from the map so the next watch() call creates a fresh one.
(Object content, Object messageHash2)
| 192 | * Removes it from the map so the next watch() call creates a fresh one. |
| 193 | */ |
| 194 | public void resolve(Object content, Object messageHash2) { |
| 195 | if (this.verbose && messageHash2 == null) { |
| 196 | System.out.println("resolve received null messageHash"); |
| 197 | return; |
| 198 | } |
| 199 | String messageHash = messageHash2.toString(); |
| 200 | rejectionsMap().remove(messageHash); // clear any stale rejection for this hash |
| 201 | Future f = futuresMap().remove(messageHash); |
| 202 | if (f != null) { |
| 203 | f.resolve(content); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | * Reject a specific future, or all futures if messageHash is null. |