EMMA Coverage Report (generated Mon Jan 28 16:15:17 GMT 2013)
[all classes][org.springframework.data.elasticsearch.client]

COVERAGE SUMMARY FOR SOURCE FILE [NodeClientFactoryBean.java]

nameclass, %method, %block, %line, %
NodeClientFactoryBean.java100% (1/1)86%  (6/7)80%  (24/30)75%  (9/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class NodeClientFactoryBean100% (1/1)86%  (6/7)80%  (24/30)75%  (9/12)
NodeClientFactoryBean (boolean): void 0%   (0/1)0%   (0/6)0%   (0/3)
NodeClientFactoryBean (): void 100% (1/1)100% (3/3)100% (2/2)
afterPropertiesSet (): void 100% (1/1)100% (10/10)100% (2/2)
getObject (): NodeClient 100% (1/1)100% (3/3)100% (1/1)
getObjectType (): Class 100% (1/1)100% (2/2)100% (1/1)
isSingleton (): boolean 100% (1/1)100% (2/2)100% (1/1)
setLocal (boolean): void 100% (1/1)100% (4/4)100% (2/2)

1package org.springframework.data.elasticsearch.client;
2 
3import org.elasticsearch.client.Client;
4import org.elasticsearch.client.node.NodeClient;
5import org.springframework.beans.factory.FactoryBean;
6import org.springframework.beans.factory.InitializingBean;
7 
8import static org.elasticsearch.node.NodeBuilder.nodeBuilder;
9 
10public class NodeClientFactoryBean implements FactoryBean<NodeClient>, InitializingBean{
11 
12    private boolean local;
13    private NodeClient nodeClient;
14 
15    NodeClientFactoryBean() {
16    }
17 
18    public NodeClientFactoryBean(boolean local) {
19        this.local = local;
20    }
21 
22    @Override
23    public NodeClient getObject() throws Exception {
24        return nodeClient;
25    }
26 
27    @Override
28    public Class<? extends Client> getObjectType() {
29        return NodeClient.class;
30    }
31 
32    @Override
33    public boolean isSingleton() {
34        return true;
35    }
36 
37    @Override
38    public void afterPropertiesSet() throws Exception {
39        nodeClient = (NodeClient) nodeBuilder().local(this.local).node().client();
40    }
41 
42    public void setLocal(boolean local) {
43        this.local = local;
44    }
45}

[all classes][org.springframework.data.elasticsearch.client]
EMMA 2.0.5312 (C) Vladimir Roubtsov