コード例 #1
0
        /// <summary>
        /// Resolves the default response destination into a Destination, using this
        /// accessor's <see cref="DestinationResolver"/> in case of a destination name.
        /// </summary>
        /// <param name="session">The session to operate on.</param>
        /// <returns>The located destination</returns>
        protected virtual Destination ResolveDefaultResponseDestination(ISession session)
        {
            Destination dest = defaultResponseDestination as Destination;

            if (dest != null)
            {
                return(dest);
            }

            DestinationNameHolder destNameHolder = defaultResponseDestination as DestinationNameHolder;

            if (destNameHolder != null)
            {
                return(DestinationResolver.ResolveDestinationName(session, destNameHolder.Name, destNameHolder.IsTopic));
            }

            return(null);
        }
コード例 #2
0
 /// <summary>
 /// Resolves the given destination name to a NMS destination.
 /// </summary>
 /// <param name="session">The current session.</param>
 /// <param name="destinationName">Name of the destination.</param>
 /// <returns>The located IDestination</returns>
 /// <exception cref="NMSException">If resolution failed.</exception>
 public virtual IDestination ResolveDestinationName(ISession session, System.String destinationName)
 {
     return(DestinationResolver.ResolveDestinationName(session, destinationName, PubSubDomain));
 }