Clover Coverage Report - ARESTC 0.1.7-SNAPSHOT
Coverage timestamp: Fri Aug 27 2010 19:12:04 CEST
../../../../img/srcFileCovDistChart4.png 95% of files have more coverage
5   73   5   1
0   24   1   5
5     1  
1    
 
  CommunicationBuilder       Line # 31 5 0% 5 6 40% 0.4
 
  (2)
 
1    /*
2    *
3    * (C)opyright 2010, Nikolaos Georgosopoulos
4    *
5    * This file is part of ARESTC.
6    *
7    * ARESTC is free software: you can redistribute it and/or modify it under the
8    * terms of the Lesser General Public License as published by the Free Software
9    * Foundation, either version 3 of the License, or (at your option) any later
10    * version.
11    *
12    * ARESTC is distributed in the hope that it will be useful, but WITHOUT ANY
13    * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14    * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15    *
16    * You should have received a copy of the Lesser General Public License along
17    * with ARESTC. If not, see <http://www.gnu.org/licenses/>.
18    */
19   
20    package net.sf.arestc.configuration;
21   
22    import org.apache.commons.configuration.ConfigurationException;
23    import org.apache.commons.httpclient.HttpClient;
24   
25    // TODO: Auto-generated Javadoc
26    /**
27    * The Class CommunicationBuilder.
28    *
29    * @author georgosn
30    */
 
31    public class CommunicationBuilder {
32   
33    /**
34    * Gets the multithreaded client.
35    *
36    * @return the multithreaded client
37    * @throws ConfigurationException
38    * the configuration exception
39    */
 
40  12 toggle public HttpClient getMultithreadedClient() throws ConfigurationException {
41  12 return CommunicationFactory.getInstance().configureClient(true);
42    }
43   
 
44  0 toggle public HttpClient getMultithreadedClient(final String communFile)
45    throws ConfigurationException {
46  0 return CommunicationFactory.getInstance().configureClient(true,
47    communFile);
48    }
49   
50    /**
51    * Gets the singlethreaded client.
52    *
53    * @return the singlethreaded client
54    * @throws ConfigurationException
55    * the configuration exception
56    */
 
57  0 toggle public HttpClient getSinglethreadedClient() throws ConfigurationException {
58  0 return CommunicationFactory.getInstance().configureClient(false);
59    }
60   
 
61  0 toggle public HttpClient getSinglethreadedClient(final String communFile)
62    throws ConfigurationException {
63  0 return CommunicationFactory.getInstance().configureClient(false,
64    communFile);
65    }
66   
67    /**
68    * Shutdown communication.
69    */
 
70  1 toggle public void shutdownCommunication() {
71  1 CommunicationFactory.getInstance().shutdown();
72    }
73    }