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