EMMA Coverage Report (generated Thu Jan 20 11:39:44 EST 2011)
[all classes][com.hammurapi.eventbus]

COVERAGE SUMMARY FOR SOURCE FILE [EventHandlerBase.java]

nameclass, %method, %block, %line, %
EventHandlerBase.java100% (1/1)75%  (3/4)92%  (55/60)88%  (1.8/2)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class EventHandlerBase$Mode100% (1/1)75%  (3/4)92%  (55/60)88%  (1.8/2)
valueOf (String): EventHandlerBase$Mode 0%   (0/1)0%   (0/5)0%   (0/1)
<static initializer> 100% (1/1)100% (34/34)100% (1/1)
EventHandlerBase$Mode (String, int): void 100% (1/1)100% (5/5)100% (1/1)
values (): EventHandlerBase$Mode [] 100% (1/1)100% (16/16)100% (1/1)

1package com.hammurapi.eventbus;
2 
3import com.hammurapi.extract.Predicate;
4 
5/**
6 * Event handler base.
7 * @author Pavel Vlasov.
8 * @param <E> Event type.
9 * @param <P> Priority type.
10 */
11public interface EventHandlerBase<E, P extends Comparable<P>, C> {
12                
13        /**
14         * Event handler mode. 
15         * Post - handler is fired when event is posted. 
16         * Remove - handler is fired when event is removed. 
17         * Both - handler is fired when event is posted and when event is removed.
18         * @author Pavel Vlasov
19         *
20         */
21        enum Mode { POST, REMOVE, BOTH }
22        
23        /**
24         * @return true if this handler consumes or updates events.
25         */
26        boolean consumes();
27        
28        /**
29         * @return priority Handler priority. Handlers with higher priority are guaranteed to be executed before
30         * handlers with lower priority and as such can consume events and prevent their dispatching to other handlers. 
31         */
32        P getPriority();
33        
34        /**
35         * @return Number of parameters expected by this handler.
36         */
37        int getCardinality();
38        
39        /**
40         * Resets handler internal state, if any.
41         */
42        void reset();
43        
44        /**
45         * @return Context for predicates.
46         */
47        C getContext();
48        
49        /**
50         * If this method returns true, then handler is invoked only once and then is removed from the bus.
51         * @return
52         */
53        boolean isOneOff();
54        
55        /**
56         * Handler mode.
57         * @return
58         */
59        Mode getMode();
60 
61        /**
62         * @return Handler predicates.
63         */
64        Predicate<E, C> getPredicate();        
65 
66}

[all classes][com.hammurapi.eventbus]
EMMA 2.0.5312 EclEmma Fix 2 (C) Vladimir Roubtsov