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

COVERAGE SUMMARY FOR SOURCE FILE [AbstractProcessor.java]

nameclass, %method, %block, %line, %
AbstractProcessor.java100% (1/1)100% (4/4)100% (34/34)100% (9/9)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AbstractProcessor100% (1/1)100% (4/4)100% (34/34)100% (9/9)
AbstractProcessor (): void 100% (1/1)100% (8/8)100% (2/2)
addLogger (Logger): boolean 100% (1/1)100% (5/5)100% (1/1)
addLoggers (Collection): boolean 100% (1/1)100% (5/5)100% (1/1)
fireException (Exception): void 100% (1/1)100% (16/16)100% (5/5)

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: AbstractProcessor.java,v 1.4 2006/09/16 14:47:56 redfish Exp $
19 
20package org.ktc.rbutils.api.audit;
21 
22import java.util.ArrayList;
23import java.util.Collection;
24import java.util.Iterator;
25 
26import org.ktc.rbutils.api.i18n.AbstractLocalized;
27 
28/**
29 * Adds logger functionalities to the Processor interface.
30 * @since RbUtils 0.9.3.3
31 * @version $Revision: 1.4 $
32 * @author moishi
33 */
34public abstract class AbstractProcessor extends AbstractLocalized implements Processor {
35 
36    /** List of registered loggers in this Processor. */
37    protected final Collection loggers = new ArrayList();
38 
39    /**
40     * {@inheritDoc}
41     */
42    public boolean addLoggers(final Collection loggersCollection) {
43        return loggers.addAll(loggersCollection);
44    }
45 
46    /**
47     * {@inheritDoc}
48     */
49    public boolean addLogger(final Logger logger) {
50        return loggers.add(logger);
51    }
52 
53    /**
54     * {@inheritDoc}
55     */
56    public void fireException(final Exception exception) {
57        for (final Iterator it = loggers.iterator(); it.hasNext();) {
58            final Logger logger = (Logger) it.next();
59            logger.addException(exception);
60        }
61    }
62 
63}

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