blob: 97bc1bd83d6ad03c4a9b1706926ca3ec960bc182 [file] [log] [blame]
Andrew Brown3f2521a2015-01-17 22:10:15 -08001/*
2 * File name: AsyncRequest.java
3 *
4 * Purpose: Helper class for tracking asynchronous Interest requests
5 *
6 * © Copyright Intel Corporation. All rights reserved.
7 * Intel Corporation, 2200 Mission College Boulevard,
8 * Santa Clara, CA 95052-8119, USA
9 */
10package com.intel.jndn.utils;
11
12import java.util.ArrayList;
13import java.util.List;
14import java.util.Observable;
15import net.named_data.jndn.Data;
16
17public class AsyncResult extends Observable {
18
19 public int responses = 0;
20 public boolean done = false;
21 public boolean success;
22 public List<Data> packets = new ArrayList<>();
23
24 /**
25 * Call this when the request has changed
26 */
27 public void changed() {
28 this.setChanged();
29 this.notifyObservers();
30 this.clearChanged();
31 }
32}