org.mmbase.module
Class LinkChecker
java.lang.Object
org.mmbase.util.functions.FunctionProvider
org.mmbase.module.Module
org.mmbase.module.ProcessorModule
org.mmbase.module.LinkChecker
- All Implemented Interfaces:
- ProcessorInterface, Runnable
- public class LinkChecker
- extends ProcessorModule
- implements Runnable
The linkChecker module detects broken urls in the urls builder and the jumpers builder.
If the linkchecker module is active it will at start up (5 minutes after the MMBase initialisation)
and start perfoming checks.
This wil only happend once every time time MMBase has been started.
For the LinckChecker to work the sendmail modules has to be configured and has to be active.
- Version:
- $Id: LinkChecker.java,v 1.20 2005/11/30 15:58:04 pierre Exp $
- Author:
- Rob vermeulen, Kees Jongenburger
|
Method Summary |
protected boolean |
checkUrl(String url)
Checks if an url exists. |
protected void |
checkUrls(String builderName,
String fieldName,
StringBuffer data)
Checks if the urls in a specified builder exist. |
String |
getModuleInfo()
provide some info on the module |
void |
init()
Initializes the module.
Init must be overridden to read the environment variables it needs.
This method is called by Module.startModule(), which makes sure it is not called
more than once. You should not call init() directly, call startModule() instead. |
void |
run()
|
| Methods inherited from class org.mmbase.module.Module |
getInitParameter, getInitParameters, getMaintainer, getModule, getModule, getModuleLoader, getModuleReader, getModules, getName, getProperties, getProperty, getVersion, hasStarted, maintainance, setInitParameter, setMaintainer, setName, setVersion, shutdown, shutdownModules, startModule, startModules, state |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinkChecker
public LinkChecker()
init
public void init()
- Description copied from class:
ProcessorModule
- Initializes the module.
Init must be overridden to read the environment variables it needs.
This method is called by Module.startModule(), which makes sure it is not called
more than once. You should not call init() directly, call startModule() instead.
- Overrides:
init in class ProcessorModule
getModuleInfo
public String getModuleInfo()
- Description copied from class:
Module
- provide some info on the module
- Overrides:
getModuleInfo in class Module
run
public void run()
- Specified by:
run in interface Runnable
checkUrls
protected void checkUrls(String builderName,
String fieldName,
StringBuffer data)
- Checks if the urls in a specified builder exist.
- Parameters:
builderName - the builder to checkfieldName - the fieldname of the url to checkdata - the StringBuffer to append error information to- Since:
- MMBase-1.7
checkUrl
protected boolean checkUrl(String url)
throws MalformedURLException,
IOException
- Checks if an url exists.
- Parameters:
url - the url to check
- Returns:
false if the url does not exist, true if the url exists
- Throws:
MalformedURLException
IOException
MMBase build 1.8.1.20060716