01: package tools.sniffer;
02:
03: import java.util.*;
04:
05: /**
06: *A list of Sniff messages. Each one corresponds to a call Id.
07: * Acknowledgement:
08: * This code was contributed by Tim Bardzil <bardzil@colorado.edu>.
09: * This code was completed as part of a class project in TLEN 5843
10: * Singaling Protocols, taught by Professor Douglas C. Sicker, Ph.D. at
11: * the University of Colorado, Boulder.
12: * Minor modifications to the code were made by M. Ranganathan .
13: *
14: *@author Tim Bardzil <bardzil@colorado.edu>
15: */
16: public class SniffMessageList extends ArrayList {
17: protected static String fileName;
18:
19: public String getCallID() {
20: SniffMessage temp = (SniffMessage) super .get(0);
21: return temp.getCallID();
22: }
23:
24: public String toXML() {
25:
26: String xmlMessages = new String();
27: ListIterator i = super .listIterator();
28: while (i.hasNext()) {
29: xmlMessages += ((SniffMessage) i.next()).toXML();
30: }
31:
32: return xmlMessages;
33: }
34: }
|