상속: IQueueBrowser, IEnumerator
예제 #1
0
        public IQueueBrowser CreateBrowser(IQueue queue, string selector)
        {
            if (queue == null)
            {
                throw new InvalidDestinationException("Cannot create a Consumer with a Null destination");
            }

            ActiveMQDestination dest    = ActiveMQDestination.Transform(queue);
            QueueBrowser        browser = null;

            try
            {
                browser = new QueueBrowser(this, GetNextConsumerId(), dest, selector, this.DispatchAsync);
            }
            catch (Exception)
            {
                if (browser != null)
                {
                    browser.Close();
                }

                throw;
            }

            return(browser);
        }
예제 #2
0
 public BrowsingMessageConsumer(QueueBrowser parent, Session session, ConsumerId id, ActiveMQDestination destination,
                                String name, String selector, int prefetch, int maxPendingMessageCount,
                                bool noLocal, bool browser, bool dispatchAsync)
     : base(session, id, destination, name, selector, prefetch, maxPendingMessageCount, noLocal, browser, dispatchAsync)
 {
     this.parent = parent;
 }
예제 #3
0
			public BrowsingMessageConsumer(QueueBrowser parent, Session session, ConsumerId id, ActiveMQDestination destination,
										   String name, String selector, int prefetch, int maxPendingMessageCount,
										   bool noLocal, bool browser, bool dispatchAsync)
				: base(session, id, destination, name, selector, prefetch, maxPendingMessageCount, noLocal, browser, dispatchAsync)
			{
				this.parent = parent;
			}
예제 #4
0
파일: Session.cs 프로젝트: Redi0/meijing-ui
        public IQueueBrowser CreateBrowser(IQueue queue, string selector)
        {
            if(queue == null)
            {
                throw new InvalidDestinationException("Cannot create a Consumer with a Null destination");
            }

            ActiveMQDestination dest = ActiveMQDestination.Transform(queue);
            QueueBrowser browser = null;

            try
            {
                browser = new QueueBrowser(this, GetNextConsumerId(), dest, selector, this.DispatchAsync);
            }
            catch(Exception)
            {
                if(browser != null)
                {
                    browser.Close();
                }

                throw;
            }

            return browser;
        }