To identify your plug-in class to the crawler, put the
class in a JAR file and enter the name of the plug-in class and the
location of the JAR file in the crawler window in the administration
console. You must enter the fully qualified name of the plug-in class,
and the absolute path name of the JAR file.
Procedure
To deploy a prefetch plug-in:
- Compile the JAVA file and create a JAR file for it. The
JAR can also contain supporting classes and resources, so you might
name it ofplugins.jar.
Requirment: Use the Java JAR utility that
is included in the Java Development Kit (JDK).
- Copy this JAR file to the computer that runs the web crawler.
Enter the absolute path for the JAR file in the administration console
on the crawler window when you enable plug-in.
- In the administration console, specify the following items:
- The fully qualified class name of the implemented Java™ class, for example, com.mycompany.ofpi.MyPrefetchPlugin
- The qualified class path for the JAR file
Ensure that the information that you enter is correct. The
system does not check that the JAR file exists.
When the crawler
is started and finds a plug-in JAR file and class name, the crawler
loads the JAR and instantiates the class by using the no-argument
constructor. The crawler then initializes the instance by calling
the init method. If that method returns true, the plug-in is added
to the list of prefetch plug-ins.
Results
After you run the crawler, the return value is logged in the
collection log file as informational message. To see information messages,
choose All messages as Type of information
to log.