예제 #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;
 }