1 28 29 package org.objectweb.openccm.Containers.MetaInformation; 30 31 import org.objectweb.ccm.util.Table; 32 import org.omg.Components.Cookie; 33 import org.omg.Components.InvalidConnection; 34 import org.omg.Components.SubscriberDescription; 35 36 37 40 public class PublisherPortInstanceImpl 41 extends EventPortInstanceImpl 42 implements PublisherPortInstance{ 43 44 protected Table _subscribers; 45 46 public PublisherPortInstanceImpl() 47 { 48 _subscribers = new Table(); 49 } 50 51 54 public SubscriberDescription[] subscribers() 55 { 56 return (SubscriberDescription[]) _subscribers.values().toArray(new SubscriberDescription[0]); 57 } 58 59 62 public void subscribers(SubscriberDescription[] value) 63 { 64 } 66 67 70 public void add_subscriber_info(SubscriberDescription info) 71 { 72 _subscribers.put(info.ck,info); 73 } 74 75 78 public void remove_subscriber_info(SubscriberDescription info) 79 { 80 _subscribers.remove(info.ck); 81 } 82 83 public SubscriberDescription get_subscriber_info(Cookie ck) 84 throws InvalidConnection 85 { 86 SubscriberDescription tmp = (SubscriberDescription) _subscribers.get(ck); 87 if(tmp == null) 88 throw new InvalidConnection(); 89 90 return tmp; 91 } 92 93 94 } 95 | Popular Tags |