def Create(chan, maxevs, bsize, objnm, idx, efn, tfn, ofs, constraints, mil, opr, vb): "stand-alone constructor" if (bsize != 1): print "For StructPullSup, batch size must be 1" bsize = 1 admin, proxy = CliUtils.get_proxy_for_sup(CosNotifyChannelAdmin.STRUCTURED_EVENT, "pull", opr, CosNotifyChannelAdmin.StructuredProxyPullConsumer, chan, objnm, ofs, vb) if (proxy == None): return None client = C(chan, admin, proxy, maxevs, bsize, objnm, idx, efn, tfn, mil, vb) b = client.L_add_filter("proxy", constraints) if (b == 1): try: admin.destroy() except: pass return None return client
def Create(chan, maxevs, bsize, objnm, idx, efn, tfn, ofs, constraints, mil, opr, vb): "stand-alone constructor" admin, proxy = CliUtils.get_proxy_for_sup( CosNotifyChannelAdmin.SEQUENCE_EVENT, "pull", opr, CosNotifyChannelAdmin.SequenceProxyPullConsumer, chan, objnm, ofs, vb) if (proxy == None): return None client = C(chan, admin, proxy, maxevs, bsize, objnm, idx, efn, tfn, mil, vb) client.num_batches = 1 # tracks the NEXT batch number b = client.L_add_filter("proxy", constraints) if (b == 1): try: admin.destroy() except: pass return None return client