net.sf.urlchecker.v2.communication
Class CommunicationBuilder

Package class diagram package CommunicationBuilder
java.lang.Object
  extended by net.sf.urlchecker.v2.communication.CommunicationBuilder

public class CommunicationBuilder
extends Object

The new CommunicationBuilder Class. This and the CheckUrlsCommand in the v2 are mandatory to use the new HttpClient.

$Id: CommunicationBuilder.java 183 2010-12-17 19:10:21Z georgosn $

Version:
$LastChangedRevision: 183 $
Author:
$LastChangedBy: georgosn $

Constructor Summary
CommunicationBuilder()
           
 
Method Summary
 org.apache.http.client.HttpClient getMultithreadedClient()
          Returns the multithreaded client configured by the default httpconfigurations file in the class-path.
 org.apache.http.client.HttpClient getMultithreadedClient(String fileName)
          Returns the multithreaded client configured by the given file if it exists in the class path.
 org.apache.http.client.HttpClient getSinglethreadedClient()
          Return the singlethreaded client configured by the default httpconfigurations file in the class-path.
 org.apache.http.client.HttpClient getSinglethreadedClient(String fileName)
          Gets the singlethreaded client configured by the given file if it exists in the class path.
 void shutdownCommunication()
          Shutdown communication.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommunicationBuilder

public CommunicationBuilder()
Method Detail

getMultithreadedClient

public org.apache.http.client.HttpClient getMultithreadedClient()
                                                         throws org.apache.commons.configuration.ConfigurationException
Returns the multithreaded client configured by the default httpconfigurations file in the class-path.

Returns:
the multithreaded client
Throws:
org.apache.commons.configuration.ConfigurationException - the configuration exception

getMultithreadedClient

public org.apache.http.client.HttpClient getMultithreadedClient(String fileName)
                                                         throws org.apache.commons.configuration.ConfigurationException
Returns the multithreaded client configured by the given file if it exists in the class path. If the file cannot be found the httpconfigurations.xml will be tried and if nothing found the internal default configuration will be used.

Parameters:
fileName - the file name
Returns:
the multithreaded client
Throws:
org.apache.commons.configuration.ConfigurationException - the configuration exception

getSinglethreadedClient

public org.apache.http.client.HttpClient getSinglethreadedClient()
                                                          throws org.apache.commons.configuration.ConfigurationException
Return the singlethreaded client configured by the default httpconfigurations file in the class-path.

Returns:
the singlethreaded client
Throws:
org.apache.commons.configuration.ConfigurationException - the configuration exception

getSinglethreadedClient

public org.apache.http.client.HttpClient getSinglethreadedClient(String fileName)
                                                          throws org.apache.commons.configuration.ConfigurationException
Gets the singlethreaded client configured by the given file if it exists in the class path. If the file cannot be found the httpconfigurations.xml will be tried and if nothing found the internal default configuration will be used.

Parameters:
fileName - the file name
Returns:
the singlethreaded client
Throws:
org.apache.commons.configuration.ConfigurationException - the configuration exception

shutdownCommunication

public void shutdownCommunication()
Shutdown communication. Releases any connections opened and forgotten. If used, the client is lost and needs to be reconfigured for another use.



Copyright © 2010 Nikolaos Georgosopoulos. All Rights Reserved.