Exemplo n.º 1
0
        public void End()
        {
            if (logger.IsDebugEnabled)
            {
                logger.Debug(this + "End()");
            }

            // check if end() was already called before by looking at endTime
            if (Interlocked.CompareExchange(ref endTime, beacon.CurrentTimestamp, -1L) != -1L)
            {
                return;
            }

            // leave all Root-Actions for sanity reasons
            while (!openRootActions.IsEmpty())
            {
                IAction action = openRootActions.Get();
                action.LeaveAction();
            }

            endTime = beacon.CurrentTimestamp;

            // create end session data on beacon
            beacon.EndSession(this);

            // finish session on configuration and stop managing it
            beaconSender.FinishSession(this);
        }
Exemplo n.º 2
0
        // *** protected methods ***

        protected override IAction DoLeaveAction()
        {
            // leave all open Child-Actions
            while (!openChildActions.IsEmpty())
            {
                IAction action = openChildActions.Get();
                action.LeaveAction();
            }

            return(base.DoLeaveAction());
        }
Exemplo n.º 3
0
        public void End()
        {
            // check if end() was already called before by looking at endTime
            if (endTime != -1)
            {
                return;
            }

            // leave all Root-Actions for sanity reasons
            while (!openRootActions.IsEmpty())
            {
                IAction action = openRootActions.Get();
                action.LeaveAction();
            }

            endTime = beacon.CurrentTimestamp;

            // create end session data on beacon
            beacon.EndSession(this);

            // finish session on configuration and stop managing it
            beaconSender.FinishSession(this);
        }