Esempio n. 1
0
        private void OpenForSubscription(MQDestination destination, string topicName, string subscriptionName, Hashtable parameters)
        {
            uint method = 0x2d2;

            this.TrEntry(method, new object[] { destination, topicName, subscriptionName, parameters });
            try
            {
                int openOptions = base.OpenOptions;
                this.subscribed = true;
                if (destination == null)
                {
                    base.objectHandle = MQQueueManager.nmqiEnv.NewPhobj();
                }
                else
                {
                    base.objectHandle = destination.objectHandle;
                }
                this.unmanagedDestinationReference = destination;
                bool flag  = (openOptions & 8) == 8;
                bool flag2 = (subscriptionName != null) && (subscriptionName.Length > 0);
                this.durable = flag && flag2;
                bool flag3 = (openOptions & 0x20) == 0x20;
                bool flag4 = destination == null;
                this.managed = flag3 | flag4;
                if (flag4)
                {
                    base.OpenOptions |= 0x20;
                }
                MQSubscriptionDescriptor mqSD = this.CreateMQSubscriptionDescriptor(topicName, subscriptionName, parameters);
                this.subscriptionReference = new MQSubscription(base.qMgr, this, mqSD);
                base.hObj = base.objectHandle.HOBJ;
                bool isOpen = this.subscriptionReference.IsOpen;
                base.isClosed = !isOpen;
            }
            finally
            {
                base.TrExit(method);
            }
        }
Esempio n. 2
0
 public MQTopic(MQQueueManager qMgr, MQDestination destination, string topicName, string topicObject, int options, string altUserId, string subscriptionName, Hashtable parameters) : base(8, qMgr, topicObject, options, altUserId)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { qMgr, destination, topicName, topicObject, options, altUserId, subscriptionName, parameters });
     this.OpenForSubscription(destination, topicName, subscriptionName, parameters);
 }
Esempio n. 3
0
 public MQTopic(MQQueueManager qMgr, MQDestination destination, string topicName, string topicObject, int options, string altUserId, string subscriptionName) : this(qMgr, destination, topicName, topicObject, options, altUserId, subscriptionName, null)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { qMgr, destination, topicName, topicObject, options, altUserId, subscriptionName });
 }
Esempio n. 4
0
 public MQTopic(MQQueueManager qMgr, MQDestination destination, string topicName, string topicObject, int options) : this(qMgr, destination, topicName, topicObject, options, null, null, null)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { qMgr, destination, topicName, topicObject, options });
 }