public SessionContextSupervisor(ISessionContextSupervisor supervisor)
            : base(new ScopeSessionContextFactory(supervisor))
        {
            _supervisor = supervisor;

            supervisor.AddSendAgent(this);
        }
 public HostActiveMqSendTransportContext(ISessionContextSupervisor sessionContextSupervisor, IPipe <SessionContext> configureTopologyPipe, string
                                         entityName, DestinationType destinationType, ILogContext logContext)
     : base(logContext)
 {
     SessionContextSupervisor = sessionContextSupervisor;
     ConfigureTopologyPipe    = configureTopologyPipe;
     EntityName      = entityName;
     DestinationType = destinationType;
 }
Esempio n. 3
0
 public SendTransportContext(IActiveMqHostConfiguration hostConfiguration, ISessionContextSupervisor sessionContextSupervisor,
                             IPipe <SessionContext> configureTopologyPipe, string entityName, DestinationType destinationType)
     : base(hostConfiguration)
 {
     SessionContextSupervisor = sessionContextSupervisor;
     ConfigureTopologyPipe    = configureTopologyPipe;
     EntityName      = entityName;
     DestinationType = destinationType;
 }
Esempio n. 4
0
        public ActiveMqSendTransport(ISessionContextSupervisor sessionContextSupervisor, IFilter <SessionContext> preSendFilter, string entityName,
                                     DestinationType destinationType)
        {
            _sessionContextSupervisor = sessionContextSupervisor;
            _filter          = preSendFilter;
            _entityName      = entityName;
            _destinationType = destinationType;

            _observers = new SendObservable();
        }
        Task <ISendTransport> CreateSendTransport(ISessionContextSupervisor sessionContextSupervisor, IFilter <SessionContext> configureTopologyFilter,
                                                  string entityName, DestinationType destinationType)
        {
            var transport = new ActiveMqSendTransport(sessionContextSupervisor, configureTopologyFilter, entityName, destinationType);

            transport.Add(sessionContextSupervisor);

            _host.Add(transport);

            return(Task.FromResult <ISendTransport>(transport));
        }
Esempio n. 6
0
        Task <ISendTransport> CreateSendTransport(ISessionContextSupervisor sessionContextSupervisor, IPipe <SessionContext> pipe,
                                                  string entityName, DestinationType destinationType)
        {
            var sendTransportContext = new HostActiveMqSendTransportContext(sessionContextSupervisor, pipe, entityName, destinationType, SendLogContext);

            var transport = new ActiveMqSendTransport(sendTransportContext);

            Add(transport);

            return(Task.FromResult <ISendTransport>(transport));
        }
Esempio n. 7
0
        Task <ISendTransport> CreateSendTransport(ISessionContextSupervisor sessionContextSupervisor, IPipe <SessionContext> pipe, string entityName,
                                                  DestinationType destinationType)
        {
            var supervisor = new SessionContextSupervisor(sessionContextSupervisor);

            var sendTransportContext = new SendTransportContext(_hostConfiguration, supervisor, pipe, entityName, destinationType);

            var transport = new ActiveMqSendTransport(sendTransportContext);

            sessionContextSupervisor.AddSendAgent(transport);

            return(Task.FromResult <ISendTransport>(transport));
        }
Esempio n. 8
0
        public Task <ISendTransport> CreatePublishTransport <T>(ISessionContextSupervisor sessionContextSupervisor)
            where T : class
        {
            LogContext.SetCurrentIfNull(_hostConfiguration.LogContext);

            IActiveMqMessagePublishTopology <T> publishTopology = _topologyConfiguration.Publish.GetMessageTopology <T>();

            var settings = publishTopology.GetSendSettings(_hostConfiguration.HostAddress);

            IPipe <SessionContext> configureTopology = new ConfigureTopologyFilter <SendSettings>(settings, publishTopology.GetBrokerTopology()).ToPipe();

            return(CreateSendTransport(sessionContextSupervisor, configureTopology, settings.EntityName, DestinationType.Topic));
        }
Esempio n. 9
0
        public Task <ISendTransport> CreateSendTransport(ISessionContextSupervisor sessionContextSupervisor, Uri address)
        {
            LogContext.SetCurrentIfNull(_hostConfiguration.LogContext);

            var endpointAddress = new ActiveMqEndpointAddress(_hostConfiguration.HostAddress, address);

            TransportLogMessages.CreateSendTransport(endpointAddress);

            var settings = _topologyConfiguration.Send.GetSendSettings(endpointAddress);

            IPipe <SessionContext> configureTopology = new ConfigureTopologyFilter <SendSettings>(settings, settings.GetBrokerTopology()).ToPipe();

            return(CreateSendTransport(sessionContextSupervisor, configureTopology, settings.EntityName,
                                       endpointAddress.Type == ActiveMqEndpointAddress.AddressType.Queue ? DestinationType.Queue : DestinationType.Topic));
        }
Esempio n. 10
0
 public ScopeSessionContextFactory(ISessionContextSupervisor supervisor)
 {
     _supervisor = supervisor;
 }
 public ActiveMqSendTransportProvider(IConnectionContextSupervisor connectionContextSupervisor, ISessionContextSupervisor modelContextSupervisor)
 {
     _connectionContextSupervisor = connectionContextSupervisor;
     _modelContextSupervisor      = modelContextSupervisor;
 }
Esempio n. 12
0
 public ActiveMqPublishTransportProvider(IConnectionContextSupervisor connectionContextSupervisor, ISessionContextSupervisor supervisor)
 {
     _connectionContextSupervisor = connectionContextSupervisor;
     _supervisor = supervisor;
 }