net.sf.urlchecker.v2.communication
Class CommunicationFactory

Package class diagram package CommunicationFactory
java.lang.Object
  extended by net.sf.urlchecker.communication.GenericCommunicationFactory<org.apache.http.client.HttpClient,org.apache.http.conn.ClientConnectionManager,HTTPMethods,org.apache.http.client.methods.HttpRequestBase>
      extended by net.sf.urlchecker.v2.communication.CommunicationFactory

public class CommunicationFactory
extends GenericCommunicationFactory<org.apache.http.client.HttpClient,org.apache.http.conn.ClientConnectionManager,HTTPMethods,org.apache.http.client.methods.HttpRequestBase>

A factory for creating Communication objects.

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

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

Field Summary
 
Fields inherited from class net.sf.urlchecker.communication.GenericCommunicationFactory
client, configured, DEFAULT_PATTERN, exceptionHandlers, FILE_NOT_FOUND, fileName, HTTPCONFIGURATION_FILENAME, LOGGER, manager, maxretries, methods, multithreaded, NO_CONFIG, urlpattern, validCodes, WARNINGS
 
Method Summary
 org.apache.http.client.HttpClient configureClient(boolean localThreadSceme)
          Configure client.
 org.apache.http.client.HttpClient configureClient(boolean localThreadSceme, String FileName)
          Configure client.
static CommunicationFactory getInstance()
          Gets the single instance of CommunicationFactory.
 org.apache.http.client.methods.HttpRequestBase getMethod(String source)
          Returns the method.
 HTTPMethods getMethodType(String source)
          Returns the method type.
 void shutdown()
          Shuts down the client.
 
Methods inherited from class net.sf.urlchecker.communication.GenericCommunicationFactory
getExceptionHandlers, getMaxretries, getOnlyValidCodes, getUrlpattern, getValidCodes, isConfigured, isMultiThreaded, isValidResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CommunicationFactory getInstance()
Gets the single instance of CommunicationFactory.

Returns:
single instance of CommunicationFactory

configureClient

public org.apache.http.client.HttpClient configureClient(boolean localThreadSceme)
                                                  throws org.apache.commons.configuration.ConfigurationException
Configure client.

Specified by:
configureClient in class GenericCommunicationFactory<org.apache.http.client.HttpClient,org.apache.http.conn.ClientConnectionManager,HTTPMethods,org.apache.http.client.methods.HttpRequestBase>
Parameters:
localThreadSceme - the multi threaded
Returns:
the http client
Throws:
org.apache.commons.configuration.ConfigurationException - the configuration exception

configureClient

public org.apache.http.client.HttpClient configureClient(boolean localThreadSceme,
                                                         String FileName)
                                                  throws org.apache.commons.configuration.ConfigurationException
Configure client.

Specified by:
configureClient in class GenericCommunicationFactory<org.apache.http.client.HttpClient,org.apache.http.conn.ClientConnectionManager,HTTPMethods,org.apache.http.client.methods.HttpRequestBase>
Parameters:
localThreadSceme - the local thread sceme
FileName - the file name
Returns:
the t
Throws:
org.apache.commons.configuration.ConfigurationException - the configuration exception

getMethod

public org.apache.http.client.methods.HttpRequestBase getMethod(String source)
Returns the method.

Specified by:
getMethod in class GenericCommunicationFactory<org.apache.http.client.HttpClient,org.apache.http.conn.ClientConnectionManager,HTTPMethods,org.apache.http.client.methods.HttpRequestBase>
Parameters:
source - the source
Returns:
the method

getMethodType

public HTTPMethods getMethodType(String source)
Returns the method type.

Specified by:
getMethodType in class GenericCommunicationFactory<org.apache.http.client.HttpClient,org.apache.http.conn.ClientConnectionManager,HTTPMethods,org.apache.http.client.methods.HttpRequestBase>
Parameters:
source - the source
Returns:
the method

shutdown

public void shutdown()
Shuts down the client.

Specified by:
shutdown in class GenericCommunicationFactory<org.apache.http.client.HttpClient,org.apache.http.conn.ClientConnectionManager,HTTPMethods,org.apache.http.client.methods.HttpRequestBase>


Copyright © 2010 Nikolaos Georgosopoulos. All Rights Reserved.