1 22 package org.jboss.mq.server; 23 24 import java.util.ArrayList ; 25 import java.util.Iterator ; 26 27 import org.jboss.mq.Subscription; 28 29 35 public class ReceiversImplArrayList implements Receivers 36 { 37 38 ArrayList receivers = new ArrayList (); 39 public void add(Subscription sub) 40 { 41 if (receivers.contains(sub)) 42 return; 43 receivers.add(sub); 44 } 45 46 public Iterator iterator() 47 { 48 return receivers.iterator(); 49 } 50 51 public ArrayList listReceivers() 52 { 53 return new ArrayList (receivers); 54 } 55 56 public void remove(Subscription sub) 57 { 58 receivers.remove(sub); 59 } 60 61 public int size() 62 { 63 return receivers.size(); 64 } 65 } 66 | Popular Tags |