/// <summary> /// Converts an IBM XMS message /// into an NMS primitive map. /// </summary> /// <param name="xmsMessage">IBM XMS message.</param> /// <returns>NMS primitive map.</returns> public static Apache.NMS.IPrimitiveMap ToMessageProperties( IBM.XMS.IMessage xmsMessage) { return(xmsMessage != null ? new Apache.NMS.XMS.MessageProperties(xmsMessage) : null); }
/// <summary> /// Converts an IBM XMS message /// into an NMS message. /// </summary> /// <param name="xmsMessage">IBM XMS message.</param> /// <returns>NMS message.</returns> public static Apache.NMS.IMessage ToNMSMessage(IBM.XMS.IMessage xmsMessage) { if (xmsMessage is IBM.XMS.ITextMessage) { return(ToNMSTextMessage((IBM.XMS.ITextMessage)xmsMessage)); } if (xmsMessage is IBM.XMS.IBytesMessage) { return(ToNMSBytesMessage((IBM.XMS.IBytesMessage)xmsMessage)); } if (xmsMessage is IBM.XMS.IStreamMessage) { return(ToNMSStreamMessage((IBM.XMS.IStreamMessage)xmsMessage)); } if (xmsMessage is IBM.XMS.IMapMessage) { return(ToNMSMapMessage((IBM.XMS.IMapMessage)xmsMessage)); } if (xmsMessage is IBM.XMS.IObjectMessage) { return(ToNMSObjectMessage((IBM.XMS.IObjectMessage)xmsMessage)); } return(xmsMessage != null ? new Apache.NMS.XMS.Message(xmsMessage) : null); }
/// <summary> /// Constructs a <c>Message</c> object. /// </summary> /// <param name="message">XMS message.</param> public Message(IBM.XMS.IMessage message) { this.xmsMessage = message; }