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

COVERAGE SUMMARY FOR SOURCE FILE [FailureException.java]

nameclass, %method, %block, %line, %
FailureException.java0%   (0/1)0%   (0/3)0%   (0/17)0%   (0/7)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FailureException0%   (0/1)0%   (0/3)0%   (0/17)0%   (0/7)
FailureException (MarkovFailureType): void 0%   (0/1)0%   (0/6)0%   (0/3)
getFailureType (): MarkovFailureType 0%   (0/1)0%   (0/3)0%   (0/1)
raise (MarkovFailureType): void 0%   (0/1)0%   (0/8)0%   (0/3)

1package de.uka.ipd.sdq.simucomframework.exceptions;
2 
3import de.uka.ipd.sdq.reliability.core.FailureStatistics;
4import de.uka.ipd.sdq.reliability.core.MarkovFailureType;
5 
6/**
7 * Represents a failure-on-demand occurrence during the simulation.
8 * 
9 * This mechanism is used in the simulation to indicate that a failure-on-demand
10 * has occurred during service execution. The executing SimProcess (an
11 * OpenWorkloadUser, ClosedWorkloadUser or ForkedBehaviourProcess) cancels its
12 * associated control and data flow. The central FailureStatistics object is
13 * updated to log the failure-on-demand occurrence.
14 * 
15 * @author brosch
16 * 
17 */
18public class FailureException extends RuntimeException {
19        private static final long serialVersionUID = -6074335938145682592L;
20 
21        /**
22         * Indicates a failure-on-demand occurrence of the given failure type.
23         * 
24         * @param failureType
25         *            the failure type identification.
26         */
27        public static void raise(final MarkovFailureType failureType) {
28                FailureStatistics.getInstance()
29                                .increaseTotalFailureCounter(failureType);
30                throw new FailureException(failureType);
31        }
32 
33        /**
34         * The failure type.
35         */
36        private MarkovFailureType failureType;
37 
38        /**
39         * A private constructor prevents the direct creation of an exception and
40         * enforces using the raise()-method instead.
41         * 
42         * @param failureType
43         *            the failure type identification
44         */
45        private FailureException(final MarkovFailureType failureType) {
46                this.failureType = failureType;
47        }
48 
49        /**
50         * Retrieves the failure type identification.
51         * 
52         * @return the failure type identification
53         */
54        public MarkovFailureType getFailureType() {
55                return failureType;
56        }
57}

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