Apache.NMS.Util.SessionUtil.GetDestination C# (CSharp) Method

GetDestination() public static method

Get the destination by parsing the embedded type prefix. Default is Queue if no prefix is embedded in the destinationName.
public static GetDestination ( ISession session, string destinationName ) : IDestination
session ISession Session object to use to get the destination.
destinationName string Name of destination with embedded prefix. The embedded prefix can be one of the following: /// /// queue:// /// topic:// /// temp-queue:// /// temp-topic:// /// ///
return IDestination
        public static IDestination GetDestination(ISession session, string destinationName)
        {
            return SessionUtil.GetDestination(session, destinationName, DestinationType.Queue);
        }

Same methods

SessionUtil::GetDestination ( ISession session, string destinationName, DestinationType defaultType ) : IDestination

Usage Example

Beispiel #1
0
        /// <summary>
        /// Delete the named destination by parsing the embedded type prefix.
        /// </summary>
        /// <param name="session">Session object to use to get the destination.</param>
        /// <param name="destinationName">Name of destination with embedded prefix.  The embedded prefix can be one of the following:
        ///		<list type="bullet">
        ///			<item>queue://</item>
        ///			<item>topic://</item>
        ///			<item>temp-queue://</item>
        ///			<item>temp-topic://</item>
        ///		</list>
        ///	</param>
        /// <param name="defaultType">Default type if no embedded prefix is specified.</param>
        /// <returns></returns>
        public static void DeleteDestination(ISession session, string destinationName, DestinationType defaultType)
        {
            IDestination destination = SessionUtil.GetDestination(session, destinationName, defaultType);

            if (null != destination)
            {
                session.DeleteDestination(destination);
            }
        }
All Usage Examples Of Apache.NMS.Util.SessionUtil::GetDestination