EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.scheduler.events]

COVERAGE SUMMARY FOR SOURCE FILE [ProceedEvent.java]

nameclass, %method, %block, %line, %
ProceedEvent.java0%   (0/1)0%   (0/5)0%   (0/40)0%   (0/16)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ProceedEvent0%   (0/1)0%   (0/5)0%   (0/40)0%   (0/16)
<static initializer> 0%   (0/1)0%   (0/4)0%   (0/2)
ProceedEvent (SchedulerModel): void 0%   (0/1)0%   (0/8)0%   (0/3)
eventRoutine (IActiveProcess): void 0%   (0/1)0%   (0/20)0%   (0/7)
setDelayedAction (IDelayedAction): void 0%   (0/1)0%   (0/4)0%   (0/2)
setScheduler (IScheduler): void 0%   (0/1)0%   (0/4)0%   (0/2)

1package de.uka.ipd.sdq.scheduler.events;
2 
3import org.apache.log4j.Logger;
4 
5import de.uka.ipd.sdq.scheduler.SchedulerModel;
6import de.uka.ipd.sdq.scheduler.processes.IActiveProcess;
7import de.uka.ipd.sdq.scheduler.strategy.IScheduler;
8import de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimEventDelegator;
9 
10/**
11 * Event to proceed the activity of a process. This event requires, that at the
12 * time it happens, the current demand of the process is zero, thus all former
13 * actions of the process have been finished.
14 * 
15 * This event can either continue the process directly or execute a delayed
16 * action of the process. Delayed actions are activities that are executed by
17 * the scheduler (e.g. some housekeeping or asking for access to a passive
18 * resource) but require the process to be running. DelayedActions have priority
19 * of the proceeding of the process as they have to be finished in oder to
20 * continue process execution.
21 * 
22 * @author jens
23 * 
24 */
25public class ProceedEvent extends AbstractSimEventDelegator<IActiveProcess> {
26 
27        private IDelayedAction action;
28        protected IScheduler scheduler;
29        static Logger logger = Logger.getLogger(ProceedEvent.class);
30 
31        public ProceedEvent(SchedulerModel model) {
32                super(model, "ProceedEvent");
33                this.action = null;                
34        }
35 
36        public void setDelayedAction(IDelayedAction action) {
37                this.action = action;
38        }
39 
40        @Override
41        public void eventRoutine(IActiveProcess process) {
42                logger.debug("Proceed Event handler triggered");
43                process.toNow();
44                if (action != null) {
45                        // once the action has been successfully executed it is removed.
46                        if (action.perform())
47                                action = null;
48                } else {
49                        process.getSchedulableProcess().activate();
50                }
51        }
52 
53        public void setScheduler(IScheduler scheduler) {
54                this.scheduler = scheduler;
55        }
56 
57}

[all classes][de.uka.ipd.sdq.scheduler.events]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov