EMMA Coverage Report (generated Fri Jun 19 09:16:10 CEST 2009)
[all classes][org.ktc.rbutils.api.audit]

COVERAGE SUMMARY FOR SOURCE FILE [EventCounter.java]

nameclass, %method, %block, %line, %
EventCounter.java100% (1/1)100% (3/3)100% (10/10)100% (5/5)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class EventCounter100% (1/1)100% (3/3)100% (10/10)100% (5/5)
EventCounter (): void 100% (1/1)100% (3/3)100% (2/2)
getCount (): int 100% (1/1)100% (3/3)100% (1/1)
processStarted (ProcessStartEvent): void 100% (1/1)100% (4/4)100% (2/2)

1/*
2 * Copyright  2005-2006 The RbUtils Project
3 *
4 *  Licensed under the Apache License, Version 2.0 (the "License");
5 *  you may not use this file except in compliance with the License.
6 *  You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 *  Unless required by applicable law or agreed to in writing, software
11 *  distributed under the License is distributed on an "AS IS" BASIS,
12 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 *  See the License for the specific language governing permissions and
14 *  limitations under the License.
15 *
16 */
17 
18// $Id: EventCounter.java,v 1.1 2007/07/08 01:07:59 moishi Exp $
19 
20package org.ktc.rbutils.api.audit;
21 
22import org.ktc.rbutils.api.audit.event.ProcessStartEvent;
23 
24/**
25 * A logger that keeps track of the number of Events it recieves.
26 * @since RbUtils 0.11
27 * @version $Revision: 1.1 $
28 * @author moishi
29 */
30public class EventCounter extends LoggerHelper {
31 
32    /** Keeps track of the number of counted events. */
33    //TODO Code - does this need to be synchronized ?
34    protected int count;
35 
36     /** Create a new errors counter. */
37    public EventCounter() {
38        // Do Nothing
39    }
40 
41    /** {@inheritDoc} */
42    public void processStarted(final ProcessStartEvent event) {
43        count = 0;
44    }
45 
46    /**
47     * Returns the number of counted events since the process started.
48     * @return the number of counted events since process started.
49     */
50    public int getCount() {
51        return count;
52    }
53}

[all classes][org.ktc.rbutils.api.audit]
EMMA 2.0.5312 (C) Vladimir Roubtsov