net.sf.urlchecker.communication
Class CommunicationFactory

Package class diagram package CommunicationFactory
java.lang.Object
  extended by net.sf.urlchecker.communication.GenericCommunicationFactory<org.apache.commons.httpclient.HttpClient,org.apache.commons.httpclient.HttpConnectionManager,HTTPMethods,org.apache.commons.httpclient.HttpMethod>
      extended by net.sf.urlchecker.communication.CommunicationFactory

public final class CommunicationFactory
extends GenericCommunicationFactory<org.apache.commons.httpclient.HttpClient,org.apache.commons.httpclient.HttpConnectionManager,HTTPMethods,org.apache.commons.httpclient.HttpMethod>

A FACTORY for creating Communication objects.

$Id: CommunicationFactory.java 182 2010-12-13 22:51:53Z georgosn $

Version:
$LastChangedRevision: 182 $
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.commons.httpclient.HttpClient configureClient(boolean localThreadSceme)
          Configure client.
 org.apache.commons.httpclient.HttpClient configureClient(boolean localThreadSceme, String FileName)
          Configure client.
static CommunicationFactory getInstance()
          Returns the single instance of CommunicationFactory.
 org.apache.commons.httpclient.HttpMethod 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()
Returns the single instance of CommunicationFactory.

Returns:
single instance of CommunicationFactory

configureClient

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

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

configureClient

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

Specified by:
configureClient in class GenericCommunicationFactory<org.apache.commons.httpclient.HttpClient,org.apache.commons.httpclient.HttpConnectionManager,HTTPMethods,org.apache.commons.httpclient.HttpMethod>
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.commons.httpclient.HttpMethod getMethod(String source)
Returns the method. Gets the method.

Specified by:
getMethod in class GenericCommunicationFactory<org.apache.commons.httpclient.HttpClient,org.apache.commons.httpclient.HttpConnectionManager,HTTPMethods,org.apache.commons.httpclient.HttpMethod>
Parameters:
source - the source
Returns:
the method

getMethodType

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

Specified by:
getMethodType in class GenericCommunicationFactory<org.apache.commons.httpclient.HttpClient,org.apache.commons.httpclient.HttpConnectionManager,HTTPMethods,org.apache.commons.httpclient.HttpMethod>
Parameters:
source - the source
Returns:
the method

shutdown

public void shutdown()
Shuts down the client. Shutdown.

Specified by:
shutdown in class GenericCommunicationFactory<org.apache.commons.httpclient.HttpClient,org.apache.commons.httpclient.HttpConnectionManager,HTTPMethods,org.apache.commons.httpclient.HttpMethod>


Copyright © 2010 Nikolaos Georgosopoulos. All Rights Reserved.