Ejemplo n.º 1
0
        private void CreateTemporaryLink(TemporaryDestination temporaryDestination)
        {
            TemporaryLink link = new TemporaryLink(temporaryLinks.Session, temporaryDestination);

            link.Attach();

            temporaryLinks.AddLink(temporaryDestination, link);
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 3
0
 internal void Remove(TemporaryDestination destination)
 {
     temporaryLinks.RemoveLink(destination);
 }
Ejemplo n.º 4
0
 internal TemporaryLink(Session session, TemporaryDestination destination) : base(session, destination)
 {
     Info = new TemporaryLinkInfo(destination.DestinationId);
     this.RequestTimeout = session.Connection.RequestTimeout;
 }