1 22 package org.jboss.mq.server; 23 24 import java.util.ArrayList ; 25 import java.util.HashSet ; 26 import java.util.Iterator ; 27 28 import org.jboss.mq.Subscription; 29 30 36 public class ReceiversImpl implements Receivers 37 { 38 40 42 43 HashSet receivers = new HashSet (); 44 45 47 49 51 53 public void add(Subscription sub) 54 { 55 receivers.add(sub); 56 } 57 58 public Iterator iterator() 59 { 60 return receivers.iterator(); 61 } 62 63 public ArrayList listReceivers() 64 { 65 return new ArrayList (receivers); 66 } 67 68 public void remove(Subscription sub) 69 { 70 receivers.remove(sub); 71 } 72 73 public int size() 74 { 75 return receivers.size(); 76 } 77 78 80 82 84 } 86 | Popular Tags |