GetFriendlyName() public method

public GetFriendlyName ( ) : String
return String
        /// <summary>
        /// Check existence of input and error endpoint and create them if needed
        /// </summary>
        private void PrepareQueues()
        {
            // Prepare input endpoint
            String inputMutexName = String.Format("Paralect.ServiceBus.{0}.InputQueue", _inputTransportEndpointAddress.GetFriendlyName());

            if (!_provider.ExistsEndpoint(_inputTransportEndpointAddress))
            {
                MutexFactory.LockByMutex(inputMutexName, () =>
                {
                    if (!_provider.ExistsEndpoint(_inputTransportEndpointAddress))
                    {
                        _provider.CreateEndpoint(_inputTransportEndpointAddress);
                    }
                });
            }

            _provider.PrepareEndpoint(_inputTransportEndpointAddress);


            // Prepare error endpoint
            String errorMutexName = String.Format("Paralect.ServiceBus.{0}.ErrorQueue", _inputTransportEndpointAddress.GetFriendlyName());

            if (!_provider.ExistsEndpoint(_errorTransportEndpointAddress))
            {
                MutexFactory.LockByMutex(errorMutexName, () =>
                {
                    if (!_provider.ExistsEndpoint(_errorTransportEndpointAddress))
                    {
                        _provider.CreateEndpoint(_errorTransportEndpointAddress);
                    }
                });
            }

            _provider.PrepareEndpoint(_errorTransportEndpointAddress);
        }
        public static void Register(TransportEndpointAddress transportEndpointAddress, ITransport transport)
        {
            if (transport == null)
                return;

            _map[transportEndpointAddress.GetFriendlyName()] = transport;
        }
        public static ITransport GetQueueProvider(TransportEndpointAddress transportEndpointAddress)
        {
            ITransport provider;
            if (!_map.TryGetValue(transportEndpointAddress.GetFriendlyName(), out provider))
                return null;

            return provider;
        }
        public static void Register(TransportEndpointAddress transportEndpointAddress, ITransport transport)
        {
            if (transport == null)
            {
                return;
            }

            _map[transportEndpointAddress.GetFriendlyName()] = transport;
        }
示例#5
0
 public void Start()
 {
     _continue       = true;
     _observerThread = new Thread(QueueObserverThread)
     {
         Name         = _threadName ?? String.Format("Transport Observer thread for queue {0}", _transportEndpointAddress.GetFriendlyName()),
         IsBackground = true,
     };
     _observerThread.Start();
 }
        public static ITransport GetQueueProvider(TransportEndpointAddress transportEndpointAddress)
        {
            ITransport provider;

            if (!_map.TryGetValue(transportEndpointAddress.GetFriendlyName(), out provider))
            {
                return(null);
            }

            return(provider);
        }