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
Example #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);
            }
        }
Example #2
0
 /// <summary>
 /// Get the destination by parsing the embedded type prefix.  Default is Queue if no prefix is
 /// embedded in the destinationName.
 /// </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>
 /// <returns></returns>
 public static IDestination GetDestination(ISession session, string destinationName)
 {
     return(SessionUtil.GetDestination(session, destinationName, DestinationType.Queue));
 }