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

COVERAGE SUMMARY FOR SOURCE FILE [InferencePolicy.java]

nameclass, %method, %block, %line, %
InferencePolicy.java100% (1/1)75%  (3/4)94%  (75/80)97%  (6.8/7)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class InferencePolicy100% (1/1)75%  (3/4)94%  (75/80)97%  (6.8/7)
valueOf (String): InferencePolicy 0%   (0/1)0%   (0/5)0%   (0/1)
<static initializer> 100% (1/1)100% (54/54)100% (6/6)
InferencePolicy (String, int): void 100% (1/1)100% (5/5)100% (1/1)
values (): InferencePolicy [] 100% (1/1)100% (16/16)100% (1/1)

1package com.hammurapi.eventbus;
2 
3/**
4 * Inference policy defines how new events (conclusions) posted by handlers are dispatched.
5 * Different policies provide different levels of serialization/concurrency of event processing.
6 * @author Pavel Vlasov
7 *
8 */
9public enum InferencePolicy {
10        
11        /**
12         * New events (conclusions) are dispatched immediately when they are posted.
13         * IMPORTANT: Use of this policy with join handlers may lead to ConcurrentModificationException if 
14         * posted events match the same join handlers and inference commands are executed in 
15         * the same thread.
16         */
17        IMMEDIATELY,
18        
19        /**
20         * Conclusions are accumulated during handler execution and are posted to the
21         * bus after the handler successfully finishes execution (without exception). 
22         */
23        AFTER_HANDLER,
24        
25        /**
26         * Conclusions are accumulated during event dispatching and are posted to the 
27         * bus after all handlers for the current event finish execution.
28         */
29        AFTER_EVENT,
30        
31        /**
32         * "Root event" is an event which is posted to the bus by the client code (not by a handler) through
33         * EventBus.post() method. With this inference policy conclusions are accumulated and get posted 
34         * to the bus after all handlers for the root event and previously posted conclusions finish execution.
35         */
36        AFTER_ROOT_EVENT,
37        
38        /**
39         * Only one event at a time is dispatched by the bus. Handlers and predicates still execute in parallel by 
40         * the executor service.   
41         */
42        EXCLUSIVE
43 
44}

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