Пример #1
0
 public static IEndpoint New(IEndpointAddress address, IMessageSerializer serializer)
 {
     return New(new CreateEndpointSettings(address)
         {
             Serializer = serializer,
         });
 }
        public CreateMsmqTransportSettings(IEndpointAddress address)
            : this()
        {
            Guard.Against.Null(address, "The address cannot be null");

            Address = new MsmqEndpointAddress(address.Uri);
        }
Пример #3
0
		public EndpointSettings(IEndpointAddress address, IMessageSerializer serializer, ITransportSettings source)
			: base(address, source)
		{
			Guard.AgainstNull(source, "source");

			Serializer = serializer;
			ErrorAddress = GetErrorEndpointAddress();
		}
 /// <summary>
 /// Log that a message was requeued to the transport after an exception occurred
 /// </summary>
 /// <param name="sourceAddress"></param>
 /// <param name="destinationAddress"></param>
 /// <param name="messageId"></param>
 /// <param name="description"> </param>
 public static void LogReQueued(this IEndpointAddress sourceAddress, IEndpointAddress destinationAddress,
                             string messageId, string description)
 {
     if (_messages.IsInfoEnabled)
     {
         _messages.InfoFormat("RQUE:{0}:{1}:{2}:{3}", sourceAddress, destinationAddress, messageId, description);
     }
 }
Пример #5
0
		public EndpointSettings(IEndpointAddress address, IEndpointSettings source)
			: base(address, source)
		{
			Guard.AgainstNull(source, "source");

			Serializer = source.Serializer;
			if (source.ErrorAddress != address)
				ErrorAddress = source.ErrorAddress;
		}
        public CreateMsmqTransportSettings(IEndpointAddress address, CreateMsmqTransportSettings source)
            : this()
        {
            Guard.Against.Null(address, "The address cannot be null");
            Guard.Against.Null(source, "The source settings cannot be null");

            Address = new MsmqEndpointAddress(address.Uri);
            Transactional = source.Transactional;
        }
Пример #7
0
        public CreateEndpointSettings(IEndpointAddress address)
            : this()
        {
            Guard.Against.Null(address, "The address cannot be null");

            Address = new EndpointAddress(address.Uri);

            SetDefaultErrorAddress();
        }
Пример #8
0
        public CreateEndpointSettings(IEndpointAddress address, CreateEndpointSettings source)
            : this()
        {
            Guard.Against.Null(address, "The address cannot be null");
            Guard.Against.Null(source, "The source settings cannot be null");

            Address = new EndpointAddress(address.Uri);
            SetDefaultErrorAddress();

            Serializer = source.Serializer;
        }
Пример #9
0
        public EndpointSettings(IEndpointAddress address, IEndpointSettings source)
            : base(address, source)
        {
            Guard.AgainstNull(source, "source");

            Serializer = source.Serializer;
            SupportedSerializers = source.SupportedSerializers;
            if (source.ErrorAddress != address)
                ErrorAddress = source.ErrorAddress;
            RetryLimit = source.RetryLimit;
            TrackerFactory = source.TrackerFactory;
        }
Пример #10
0
        public EndpointSettings(IEndpointAddress address, IMessageSerializer serializer, ITransportSettings source)
            : base(address, source)
        {
            Guard.AgainstNull(source, "source");

            Serializer = serializer;

            var messageSerializers = new SupportedMessageSerializers();
            messageSerializers.AddSerializer(serializer);
            SupportedSerializers = messageSerializers;

            ErrorAddress = GetErrorEndpointAddress();
        }
Пример #11
0
		public TransportSettings(IEndpointAddress address)
		{
			Guard.AgainstNull(address, "address");

			Address = address;

			Transactional = Address.IsTransactional;
			RequireTransactional = false;
			TransactionTimeout = 30.Seconds();
			IsolationLevel = IsolationLevel.Serializable;

			CreateIfMissing = true;
			PurgeExistingMessages = false;
		}
Пример #12
0
        public EndpointBuilderImpl([NotNull] IEndpointAddress address, [NotNull] IEndpointSettings settings,
            [NotNull] ITransportSettings errorSettings, [NotNull] DuplexTransportFactory transportFactory,
            [NotNull] OutboundTransportFactory errorTransportFactory,
            [NotNull] Func<IInboundMessageTracker> messageTrackerFactory)
        {
            if (address == null)
                throw new ArgumentNullException("address");

            _address = address;
            _settings = settings;
            _errorSettings = errorSettings;
            _transportFactory = transportFactory;
            _errorTransportFactory = errorTransportFactory;
            _messageTrackerFactory = messageTrackerFactory;
        }
Пример #13
0
		public TransportSettings(IEndpointAddress address, ITransportSettings source)
		{
			Guard.AgainstNull(address, "address");
			Guard.AgainstNull(source, "source");

			Address = address;

			Transactional = source.Transactional;
			RequireTransactional = source.RequireTransactional;
			TransactionTimeout = source.TransactionTimeout;
			IsolationLevel = source.IsolationLevel;

			CreateIfMissing = source.CreateIfMissing;
			PurgeExistingMessages = source.PurgeExistingMessages;
		}
        public EndpointSettings CreateEndpointSettings(IEndpointAddress address)
        {
            var settings = new EndpointSettings(address)
                {
                    Serializer = Serializer,
                    SupportedSerializers = SupportedSerializers,
                    CreateIfMissing = CreateMissingQueues,
                    TransactionTimeout = TransactionTimeout,
                    PurgeExistingMessages = PurgeOnStartup,
                    RequireTransactional = RequireTransactional,
                    IsolationLevel = IsolationLevel,
                    Transactional = CreateTransactionalQueues,
                    RetryLimit = RetryLimit,
                    TrackerFactory = TrackerFactory
                };

            return settings;
        }
Пример #15
0
 public RabbitMqTransport(IEndpointAddress address, IConnection connection) : base(address)
 {
     _connection = connection;
 }
Пример #16
0
 public bool WasEndpointAlreadySent(IEndpointAddress address)
 {
     return(_wasEndpointAlreadySent(address.Uri));
 }
Пример #17
0
		EndpointSettings(IEndpointAddress address)
			: base(address)
		{
			ErrorAddress = GetErrorEndpointAddress();
		}
Пример #18
0
 public LoopbackTransport(IEndpointAddress address)
 {
     Address = address;
 }
Пример #19
0
 public NullOutboundTransport(IEndpointAddress address)
 {
     _address = address;
 }
Пример #20
0
 public RabbitMqTransport(IEndpointAddress address, IConnection connection) : base(address)
 {
     _connection = connection;
 }
Пример #21
0
        protected void Purge(IEndpointAddress address)
        {
            var management = MsmqEndpointManagement.New(address.Uri);

            management.Purge();
        }
Пример #22
0
 public NullTransport(IEndpointAddress address)
 {
     Address = address;
 }
 public EndpointConfigurator SetErrorAddress(Uri uri)
 {
     _errorAddress = new EndpointAddress(uri);
     return this;
 }
Пример #24
0
 public LoopbackTransport(IEndpointAddress address)
 {
     Address = address;
 }
Пример #25
0
 public void NotifySend(IEndpointAddress address)
 {
 }
Пример #26
0
 public void NotifySend(IEndpointAddress address)
 {
     throw CreateException();
 }
Пример #27
0
 public void NotifySend <T>(ISendContext <T> sendContext, IEndpointAddress address) where T : class
 {
     _context.NotifySend(sendContext, address);
 }
Пример #28
0
 public void NotifySend(ISendContext context, IEndpointAddress address)
 {
     _context.NotifySend(context, address);
 }
Пример #29
0
 public EndpointConfigurator SetErrorAddress(Uri uri)
 {
     _errorAddress = new EndpointAddress(uri);
     return(this);
 }
Пример #30
0
 protected TransportBase(IEndpointAddress address)
 {
     Address = address;
 }
Пример #31
0
 public CreateMsmqEndpointSettings(IEndpointAddress endpointAddress)
     : base(endpointAddress)
 {
     SetDefaultErrorAddress();
 }
Пример #32
0
 public NullTransport(IEndpointAddress address) : base(address)
 {
 }
Пример #33
0
 /// <summary>
 ///   Initializes a new instance of the <see cref = "StompTransport" /> class.
 /// </summary>
 /// <param name = "address">The address.</param>
 /// <param name = "client">The client.</param>
 public StompTransport(IEndpointAddress address, StompClient client)
     : base(address)
 {
     StompClient            = client;
     StompClient.OnMessage += msg => _messages.Enqueue(msg);
 }
Пример #34
0
 public PublishEndpointSinkLocator(Type messageType, IEndpointAddress endpointAddress)
 {
     _endpointAddress = endpointAddress;
     _messageType     = messageType;
 }
Пример #35
0
		public Transport(IEndpointAddress address, Func<IInboundTransport> inboundFactory, Func<IOutboundTransport> outboundFactory)
		{
			_inboundFactory = inboundFactory;
			_outboundFactory = outboundFactory;
			_address = address;
		}
		public static IEndpointManagement New(IEndpointAddress address)
		{
			return new MsmqEndpointManagement(address);
		}
Пример #37
0
        public MulticastUdpTransport(IEndpointAddress address)
        {
            Address = address;

            Initialize();
        }
Пример #38
0
 EndpointSettings(IEndpointAddress address)
     : base(address)
 {
     ErrorAddress = GetErrorEndpointAddress();
 }
Пример #39
0
		public LoopbackTransport(IEndpointAddress address)
			: base(address)
		{
		}
Пример #40
0
 public void NotifySend <T>(ISendContext <T> sendContext, IEndpointAddress address)
     where T : class
 {
     _sent.Add(new Sent <T>(sendContext, address, _timer.ElapsedMilliseconds));
 }
Пример #41
0
 public NullTransport(IEndpointAddress address) : base(address)
 {
 }
Пример #42
0
 public void NotifySend(ISendContext context, IEndpointAddress address)
 {
     _sent.Add(new Sent(context, address, _timer.ElapsedMilliseconds));
 }
Пример #43
0
 private ConnectionHandler<StompConnection> GetConnection(IEndpointAddress address)
 {
     return _connectionCache
         .Retrieve(address.Uri,
                   () =>
                       {
                           var connection = _connectionFactory.Build(address.Uri);
                           var connectionHandler = new ConnectionHandlerImpl<StompConnection>(connection);
                           return connectionHandler;
                       });
 }
Пример #44
0
 static void Ignore(IEndpointAddress endpoint)
 {
 }
		public static void Manage(IEndpointAddress address, Action<IEndpointManagement> action)
		{
			try
			{
				var management = new MsmqEndpointManagement(address);
				action(management);
			}
			catch (EndpointException)
			{
				throw;
			}
			catch (Exception ex)
			{
				throw new TransportException(address.Uri, "There was a problem managing the transport", ex);
			}
		}
Пример #46
0
		public NmsEndpoint(IEndpointAddress address, IMessageSerializer serializer, ITransport transport, ITransport errorTransport)
			: base(address, serializer, transport, errorTransport)
		{
		}
		private MsmqEndpointManagement(IEndpointAddress address)
		{
			_address = address as MsmqEndpointAddress ?? new MsmqEndpointAddress(address.Uri);
		}
Пример #48
0
 public OutboundStompTransport(IEndpointAddress address, ConnectionHandler<StompConnection> connectionHandler)
 {
     _connectionHandler = connectionHandler;
     _address = address;
 }