/// <summary> /// Creates a new connection to TIBCO. /// </summary> public Apache.NMS.IConnection CreateConnection(string userName, string password) { Apache.NMS.IConnection connection = null; try { connection = EMSConvert.ToNMSConnection(this.tibcoConnectionFactory.CreateConnection(userName, password)); ConfigureConnection(connection); } catch (Exception ex) { ExceptionUtil.WrapAndThrowNMSException(ex); } return(connection); }
public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination, string selector, bool noLocal) { Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination)destination; try { Apache.NMS.IMessageConsumer consumer = EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination, selector, noLocal)); ConfigureConsumer(consumer); return(consumer); } catch (Exception ex) { ExceptionUtil.WrapAndThrowNMSException(ex); return(null); } }
public Apache.NMS.IMessageConsumer CreateDurableConsumer(Apache.NMS.ITopic destination, string name, string selector, bool noLocal) { Apache.NMS.EMS.Topic topicObj = (Apache.NMS.EMS.Topic)destination; try { Apache.NMS.IMessageConsumer consumer = EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateDurableSubscriber(topicObj.tibcoTopic, name, selector, noLocal)); ConfigureConsumer(consumer); return(consumer); } catch (Exception ex) { ExceptionUtil.WrapAndThrowNMSException(ex); return(null); } }
public Apache.NMS.IMessageProducer CreateProducer(Apache.NMS.IDestination destination) { Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination)destination; try { Apache.NMS.IMessageProducer producer = EMSConvert.ToNMSMessageProducer(this, this.tibcoSession.CreateProducer(destinationObj.tibcoDestination)); ConfigureProducer(producer); return(producer); } catch (Exception ex) { ExceptionUtil.WrapAndThrowNMSException(ex); return(null); } }
/// <summary> /// Creates a new connection to TIBCO. /// </summary> public Apache.NMS.IConnection CreateConnection(string userName, string password) { Apache.NMS.IConnection connection = null; try { connection = EMSConvert.ToNMSConnection(this.tibcoConnectionFactory.CreateConnection(userName, password)); connection.RedeliveryPolicy = this.redeliveryPolicy.Clone() as IRedeliveryPolicy; } catch (Exception ex) { ExceptionUtil.WrapAndThrowNMSException(ex); } return(connection); }
/// <summary> /// Sends the message to the default destination with the explicit QoS configuration /// </summary> public void Send(Apache.NMS.IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive) { Apache.NMS.EMS.Message msg = GetEMSMessage(message); try { this.tibcoMessageProducer.Send( msg.tibcoMessage, EMSConvert.ToMessageDeliveryMode(deliveryMode), (int)priority, (long)timeToLive.TotalMilliseconds); } catch (Exception ex) { ExceptionUtil.WrapAndThrowNMSException(ex); } }
private void HandleTibcoMsg(object sender, TIBCO.EMS.EMSMessageEventArgs arg) { Apache.NMS.IMessage message = EMSConvert.ToNMSMessage(arg.Message); if (null != message) { if (Listener != null) { try { Listener(message); } catch (Exception ex) { Apache.NMS.Tracer.Debug("Error handling message: " + ex.Message); } } else { this.dispatcher.Enqueue(message); } } }
public Apache.NMS.IBytesMessage CreateBytesMessage() { return(EMSConvert.ToNMSBytesMessage(this.tibcoSession.CreateBytesMessage())); }
public Apache.NMS.ITemporaryQueue CreateTemporaryQueue() { return(EMSConvert.ToNMSTemporaryQueue(this.tibcoSession.CreateTemporaryQueue())); }
public Apache.NMS.ITopic GetTopic(string name) { return(EMSConvert.ToNMSTopic(this.tibcoSession.CreateTopic(name))); }
public Apache.NMS.IQueue GetQueue(string name) { return(EMSConvert.ToNMSQueue(this.tibcoSession.CreateQueue(name))); }
public Apache.NMS.IMessageConsumer CreateDurableConsumer(Apache.NMS.ITopic destination, string name, string selector, bool noLocal) { Apache.NMS.EMS.Topic topicObj = (Apache.NMS.EMS.Topic)destination; return(EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateDurableSubscriber(topicObj.tibcoTopic, name, selector, noLocal))); }
public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination, string selector, bool noLocal) { Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination)destination; return(EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination, selector, noLocal))); }
public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination) { Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination)destination; return(EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination))); }
/// <summary> /// Creates a new connection to TIBCO. /// </summary> public Apache.NMS.IConnection CreateConnection(string userName, string password) { return(EMSConvert.ToNMSConnection(this.tibcoConnectionFactory.CreateConnection(userName, password))); }
public Apache.NMS.IMapMessage CreateMapMessage() { return(EMSConvert.ToNMSMapMessage(this.tibcoSession.CreateMapMessage())); }
public Apache.NMS.ITextMessage CreateTextMessage(string text) { return(EMSConvert.ToNMSTextMessage(this.tibcoSession.CreateTextMessage(text))); }
public Apache.NMS.ITemporaryTopic CreateTemporaryTopic() { return(EMSConvert.ToNMSTemporaryTopic(this.tibcoSession.CreateTemporaryTopic())); }
/// <summary> /// Creates a new connection to TIBCO. /// </summary> public Apache.NMS.IConnection CreateConnection() { return(EMSConvert.ToNMSConnection(this.tibcoConnectionFactory.CreateConnection())); }
public Apache.NMS.IObjectMessage CreateObjectMessage(Object body) { return(EMSConvert.ToNMSObjectMessage(this.tibcoSession.CreateObjectMessage(body))); }