예제 #1
0
 public MqttClientSubscriptionsManager(
     MqttClientSession clientSession,
     IMqttServerOptions serverOptions,
     MqttServerEventDispatcher eventDispatcher,
     IMqttRetainedMessagesManager retainedMessagesManager)
 {
     _clientSession           = clientSession ?? throw new ArgumentNullException(nameof(clientSession));
     _options                 = serverOptions ?? throw new ArgumentNullException(nameof(serverOptions));
     _eventDispatcher         = eventDispatcher ?? throw new ArgumentNullException(nameof(eventDispatcher));
     _retainedMessagesManager = retainedMessagesManager ?? throw new ArgumentNullException(nameof(retainedMessagesManager));
 }
예제 #2
0
        public MqttClientSession(
            string clientId,
            IDictionary <object, object> items,
            MqttServerEventDispatcher eventDispatcher,
            IMqttServerOptions serverOptions,
            IMqttRetainedMessagesManager retainedMessagesManager)
        {
            ClientId = clientId ?? throw new ArgumentNullException(nameof(clientId));
            Items    = items ?? throw new ArgumentNullException(nameof(items));

            SubscriptionsManager     = new MqttClientSubscriptionsManager(this, serverOptions, eventDispatcher, retainedMessagesManager);
            ApplicationMessagesQueue = new MqttClientSessionApplicationMessagesQueue(serverOptions);
        }
예제 #3
0
        public MqttClientSessionsManager(
            IMqttServerOptions options,
            IMqttRetainedMessagesManager retainedMessagesManager,
            MqttServerEventDispatcher eventDispatcher,
            IMqttNetLogger logger)
        {
            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }
            _logger     = logger.WithSource(nameof(MqttClientSessionsManager));
            _rootLogger = logger;

            _eventDispatcher         = eventDispatcher ?? throw new ArgumentNullException(nameof(eventDispatcher));
            _options                 = options ?? throw new ArgumentNullException(nameof(options));
            _retainedMessagesManager = retainedMessagesManager ??
                                       throw new ArgumentNullException(nameof(retainedMessagesManager));
        }