Class RobotsManager.HostExecutor
- java.lang.Object
-
- org.apache.manifoldcf.core.cachemanager.ExecutorBase
-
- org.apache.manifoldcf.crawler.connectors.webcrawler.RobotsManager.HostExecutor
-
- All Implemented Interfaces:
org.apache.manifoldcf.core.interfaces.ICacheExecutor
- Enclosing class:
- RobotsManager
protected static class RobotsManager.HostExecutor extends org.apache.manifoldcf.core.cachemanager.ExecutorBaseThis is the executor object for locating robots host objects. This object furnishes the operations the cache manager needs to rebuild objects that it needs that are not in the cache at the moment.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.manifoldcf.crawler.interfaces.IProcessActivityactivitiesprotected RobotsManager.RobotsDatareturnValueprotected RobotsManager.HostDescriptionthisHostprotected RobotsManagerthisManager
-
Constructor Summary
Constructors Constructor Description HostExecutor(RobotsManager manager, org.apache.manifoldcf.crawler.interfaces.IProcessActivity activities, RobotsManager.HostDescription objectDescription)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object[]create(org.apache.manifoldcf.core.interfaces.ICacheDescription[] objectDescriptions)Create a set of new objects to operate on and cache.voidexecute()Perform the desired operation.voidexists(org.apache.manifoldcf.core.interfaces.ICacheDescription objectDescription, java.lang.Object cachedObject)Notify the implementing class of the existence of a cached version of the object.RobotsManager.RobotsDatagetResults()Get the result.
-
-
-
Field Detail
-
thisManager
protected RobotsManager thisManager
-
returnValue
protected RobotsManager.RobotsData returnValue
-
thisHost
protected RobotsManager.HostDescription thisHost
-
activities
protected org.apache.manifoldcf.crawler.interfaces.IProcessActivity activities
-
-
Constructor Detail
-
HostExecutor
public HostExecutor(RobotsManager manager, org.apache.manifoldcf.crawler.interfaces.IProcessActivity activities, RobotsManager.HostDescription objectDescription)
Constructor.- Parameters:
manager- is the RobotsManager class instance.objectDescription- is the desired object description.
-
-
Method Detail
-
getResults
public RobotsManager.RobotsData getResults()
Get the result.- Returns:
- the looked-up or read cached instance.
-
create
public java.lang.Object[] create(org.apache.manifoldcf.core.interfaces.ICacheDescription[] objectDescriptions) throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionCreate a set of new objects to operate on and cache. This method is called only if the specified object(s) are NOT available in the cache. The specified objects should be created and returned; if they are not created, it means that the execution cannot proceed, and the execute() method will not be called.- Parameters:
objectDescriptions- is the set of unique identifier of the object.- Returns:
- the newly created objects to cache, or null, if any object cannot be created. The order of the returned objects must correspond to the order of the object descriptinos.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
exists
public void exists(org.apache.manifoldcf.core.interfaces.ICacheDescription objectDescription, java.lang.Object cachedObject) throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionNotify the implementing class of the existence of a cached version of the object. The object is passed to this method so that the execute() method below will have it available to operate on. This method is also called for all objects that are freshly created as well.- Parameters:
objectDescription- is the unique identifier of the object.cachedObject- is the cached object.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
execute
public void execute() throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionPerform the desired operation. This method is called after either createGetObject() or exists() is called for every requested object.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
-