Exemplo n.º 1
0
        public CrystalDifusionConnectionEvents(ICrystalDifusionConnectionBase conn,
                                               CrystalConnectionMessageHandle handle,
                                               ILogger <CrystalDifusionConnectionEvents> logger,
                                               string connectionId,
                                               DifusionCredential credential,
                                               ICrystalConnectionStatistics connectionStatistics)
        {
            this.conn         = conn;
            this.logger       = logger;
            this.connectionId = connectionId;
            this.handle       = handle;
            this.credential   = credential;

            Disconnected = DisconnectHandle;
            Connected    = ConnectedtHandle;

            crystalReader  = new CrystalConnectionReaderEvent(this, conn, logger, Disconnected, connectionId);
            crystalWriter  = new CrystalConnectionWriterEvent(conn, logger, Disconnected, queue, connectionId);
            crystalWatcher = new CrystalConnectionWatcher(queue, Disconnected, logger);

            reconnect = new AtomicRunBoolean(false);
            watch     = new AtomicRunBoolean(false);
            connected = new AtomicRunBoolean(false);

            this.connectionStatistics = connectionStatistics;
        }
 public CrystalConnectionReaderEvent(CrystalConnectionMessageHandle handle,
                                     ICrystalDifusionConnectionBase conn,
                                     ILogger logger,
                                     CrystalConnectionEvent disconnectEvent,
                                     string connectionId)
 {
     this.handle          = handle;
     this.conn            = conn;
     this.logger          = logger;
     this.disconnectEvent = disconnectEvent;
     this.connectionId    = connectionId;
 }
Exemplo n.º 3
0
        public CrystalConnectionWriterEvent(ICrystalDifusionConnectionBase conn,
                                            ILogger logger,
                                            CrystalConnectionEvent disconnectEvent,
                                            BlockingCollection <string> queue,
                                            string connectionId)
        {
            this.conn            = conn;
            this.logger          = logger;
            this.disconnectEvent = disconnectEvent;
            this.queue           = queue;
            this.connectionId    = connectionId;

            run = new AtomicRunBoolean();
        }