|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.urlchecker.communication.GenericCommunicationFactory<T,M,S,E>
T
- the generic typeM
- the generic typeS
- the generic typeE
- the element type
$Id: GenericCommunicationFactory.java 180 2010-12-12 18:47:56Z georgosn $
public abstract class GenericCommunicationFactory<T,M,S,E>
A factory for creating GenericCommunication objects. This class was created to serve the two different httpClients and may be removed in future versions of the library.
Field Summary | |
---|---|
protected T |
client
The client. |
protected boolean |
configured
The configured. |
static Pattern |
DEFAULT_PATTERN
The Constant PATTERN to be used if no URL pattern is configured. |
protected Map<String,ExceptionHandler<?>> |
exceptionHandlers
The exception handlers. |
protected static String |
FILE_NOT_FOUND
The Constant FILE_NOT_FOUND. |
protected String |
fileName
The file name. |
protected static String |
HTTPCONFIGURATION_FILENAME
The Constant HTTPCONFIGURATION_FILENAME. |
protected static org.apache.log4j.Logger |
LOGGER
The Constant LOGGER. |
protected M |
manager
The manager. |
protected int |
maxretries
The maxretries. |
protected Map<String,S> |
methods
The methods. |
protected boolean |
multithreaded
The multithreaded. |
protected static String |
NO_CONFIG
The Constant NO_CONFIG. |
protected Pattern |
urlpattern
The urlpattern. |
protected Map<String,Integer[]> |
validCodes
The valid codes. |
protected static String[] |
WARNINGS
The Constant WARNINGS. |
Constructor Summary | |
---|---|
GenericCommunicationFactory()
|
Method Summary | |
---|---|
abstract T |
configureClient(boolean localThreadSceme)
Configure client. |
abstract T |
configureClient(boolean localThreadSceme,
String FileName)
Configure client. |
Map<String,ExceptionHandler<?>> |
getExceptionHandlers()
Returns the exception handlers. |
int |
getMaxretries()
Returns the maxretries. |
abstract E |
getMethod(String source)
Returns the method. |
abstract S |
getMethodType(String source)
Returns the method type. |
Integer[] |
getOnlyValidCodes(String source)
Returns the only valid codes. |
Pattern |
getUrlpattern()
Returns the urlpattern. |
Map<String,Integer[]> |
getValidCodes()
Returns the valid codes. |
boolean |
isConfigured()
Checks if client is configured. |
boolean |
isMultiThreaded()
Checks if client connection manager is multi threaded. |
boolean |
isValidResponse(Result result)
Checks if a response is valid . |
abstract void |
shutdown()
Shuts down the client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Pattern DEFAULT_PATTERN
((https?|ftp|gopher):((//)|(\\\\))+([\\w\\d:#@%/;$\\(\\)~_?\\+-=\\\\.]|&(?!(lt;|gt;|amp;|apos;|quot;)))*)
protected static final String HTTPCONFIGURATION_FILENAME
protected static final String[] WARNINGS
protected static final String NO_CONFIG
protected static final String FILE_NOT_FOUND
protected static final org.apache.log4j.Logger LOGGER
protected transient boolean configured
protected transient T client
protected transient M manager
protected boolean multithreaded
protected Map<String,Integer[]> validCodes
protected Map<String,ExceptionHandler<?>> exceptionHandlers
protected int maxretries
protected Map<String,S> methods
protected String fileName
protected Pattern urlpattern
Constructor Detail |
---|
public GenericCommunicationFactory()
Method Detail |
---|
public abstract T configureClient(boolean localThreadSceme) throws org.apache.commons.configuration.ConfigurationException
T
- a T object.M
- a M object.S
- a S object.E
- a E object.localThreadSceme
- the multi threaded
org.apache.commons.configuration.ConfigurationException
- the configuration exceptionpublic abstract T configureClient(boolean localThreadSceme, String FileName) throws org.apache.commons.configuration.ConfigurationException
localThreadSceme
- the local thread scemeFileName
- the file name
org.apache.commons.configuration.ConfigurationException
- the configuration exceptionpublic Map<String,ExceptionHandler<?>> getExceptionHandlers()
public int getMaxretries()
public abstract E getMethod(String source)
source
- the source
public abstract S getMethodType(String source)
source
- the source
public Integer[] getOnlyValidCodes(String source)
source
- the source
public Pattern getUrlpattern()
public Map<String,Integer[]> getValidCodes()
public boolean isConfigured()
public boolean isMultiThreaded()
public boolean isValidResponse(Result result)
result
- the result
public abstract void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |