com.google.enterprise.adaptor.examples
Class AdaptorTemplate

java.lang.Object
  extended by com.google.enterprise.adaptor.AbstractAdaptor
      extended by com.google.enterprise.adaptor.examples.AdaptorTemplate
All Implemented Interfaces:
Adaptor

public class AdaptorTemplate
extends AbstractAdaptor

Demonstrates what code is necessary for putting public content onto a GSA. The key operations are:

  1. providing document ids
  2. providing document bytes given a document id


Constructor Summary
AdaptorTemplate()
           
 
Method Summary
 void getDocContent(Request req, Response resp)
          Gives the bytes of a document referenced with id.
 void getDocIds(DocIdPusher pusher)
          Gives list of document ids that you'd like on the GSA.
static void main(String[] args)
          Call default main for adaptors.
 
Methods inherited from class com.google.enterprise.adaptor.AbstractAdaptor
destroy, init, initConfig, main
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdaptorTemplate

public AdaptorTemplate()
Method Detail

getDocIds

public void getDocIds(DocIdPusher pusher)
               throws InterruptedException
Gives list of document ids that you'd like on the GSA.

Throws:
InterruptedException

getDocContent

public void getDocContent(Request req,
                          Response resp)
                   throws IOException
Gives the bytes of a document referenced with id.

Throws:
IOException

main

public static void main(String[] args)
Call default main for adaptors.