1 package org.jacorb.trading.util; 2 3 import org.omg.CosTrading.*; 4 import org.omg.CosTrading.LookupPackage.*; 5 import org.omg.CORBA.*; 6 import java.lang.*; 7 8 47 48 public class QueryContainer { 49 protected String m_type; 50 protected String m_constr; 51 protected String m_pref; 52 protected org.omg.CosTrading.Policy[] m_policies; 53 protected SpecifiedProps m_desired_props; 54 protected int m_how_many; 55 protected OfferSeqHolder m_offers; 56 protected OfferIteratorHolder m_offer_itr; 57 protected PolicyNameSeqHolder m_limits_applied; 58 protected UserException m_exception = null; 59 protected Lookup m_target; 60 protected Semaphore m_mutex; 61 62 public int no = 0; 63 public static int count = 0; 64 65 76 public QueryContainer(String type, 77 String constr, 78 String pref, 79 org.omg.CosTrading.Policy[] policies, 80 SpecifiedProps desired_props, 81 int how_many, 82 Lookup target) { 83 m_type = type; 84 m_constr = constr; 85 m_pref = pref; 86 m_policies = policies; 87 m_desired_props = desired_props; 88 m_how_many = how_many; 89 m_target = target; 90 91 no = count++; 92 93 m_offers = new OfferSeqHolder(); 96 m_offer_itr = new OfferIteratorHolder(); 97 m_limits_applied = new PolicyNameSeqHolder(); 98 99 m_mutex = new Semaphore(0); 100 101 } 102 103 104 111 public QueryContainer(QueryContainer templ, Lookup target){ 112 this(templ.m_type, templ.m_constr, templ.m_pref, 113 templ.m_policies, templ.m_desired_props, 114 templ.m_how_many, target); 115 } 116 117 120 public void resultReady(){ 121 m_mutex.P(); } 124 125 132 public UserException getException(){ 133 return m_exception; 134 } 135 136 142 public OfferSeqHolder getOffers(){ 143 return m_offers; 144 } 145 146 152 public OfferIteratorHolder getItr(){ 153 return m_offer_itr; 154 } 155 156 162 public PolicyNameSeqHolder getLimits(){ 163 return m_limits_applied; 164 } 165 166 } 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | Popular Tags |