Exemple #1
0
        private void CreateTemporaryLink(TemporaryDestination temporaryDestination)
        {
            TemporaryLink link = new TemporaryLink(temporaryLinks.Session, temporaryDestination);

            link.Attach();

            temporaryLinks.AddLink(temporaryDestination, link);
        }
Exemple #2
0
 internal void DestroyTemporaryDestination(TemporaryDestination destination)
 {
     ThrowIfClosed();
     foreach (Session session in GetSessions())
     {
         if (session.IsDestinationInUse(destination))
         {
             throw new IllegalStateException("Cannot delete Temporary Destination, {0}, while consuming messages.");
         }
     }
     try
     {
         TemporaryLink link = temporaryLinks.RemoveLink(destination);
         if (link != null && !link.IsClosed)
         {
             link.Close();
         }
     }
     catch (Exception e)
     {
         throw ExceptionSupport.Wrap(e);
     }
 }
Exemple #3
0
 internal void Remove(TemporaryDestination destination)
 {
     temporaryLinks.RemoveLink(destination);
 }
Exemple #4
0
 internal TemporaryLink(Session session, TemporaryDestination destination) : base(session, destination)
 {
     Info = new TemporaryLinkInfo(destination.DestinationId);
     this.RequestTimeout = session.Connection.RequestTimeout;
 }