|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.enterprise.adaptor.AbstractAdaptor
public abstract class AbstractAdaptor
Provides a reasonable default implementation for most Adaptor
methods. Extending classes only need to implement Adaptor.getDocIds(com.google.enterprise.adaptor.DocIdPusher)
and Adaptor.getDocContent(com.google.enterprise.adaptor.Request, com.google.enterprise.adaptor.Response)
.
Constructor Summary | |
---|---|
AbstractAdaptor()
|
Method Summary | |
---|---|
void |
destroy()
Shutdown and release resources of adaptor. |
void |
init(AdaptorContext context)
Initialize adaptor with the current context. |
void |
initConfig(Config config)
Provides the opportunity for the Adaptor to create new configuration values or override default values. |
static Application |
main(Adaptor adaptor,
String[] args)
Standard main for all adaptors (including those not extending AbstractAdaptor). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.google.enterprise.adaptor.Adaptor |
---|
getDocContent, getDocIds |
Constructor Detail |
---|
public AbstractAdaptor()
Method Detail |
---|
public void initConfig(Config config)
Config.addKey(java.lang.String, java.lang.String)
should likely be
called. The user's configuration will override any values set in this way.
This method is called by main(com.google.enterprise.adaptor.Adaptor, java.lang.String[])
before Adaptor.init(com.google.enterprise.adaptor.AdaptorContext)
is called.
This implementation does nothing.
initConfig
in interface Adaptor
public void init(AdaptorContext context) throws Exception
context
points to other useful objects that can be used at any time. For example,
methods on DocIdPusher
provided via AdaptorContext.getDocIdPusher()
are allowed to be called whenever the
Adaptor wishes. This allows doing event-based incremental pushes at any
time.
The method is called at the end of GsaCommunicationHandler.start()
.
If you experience a fatal error during initialization, feel free to
throw an Exception
to cancel the startup process.
This implementation does nothing.
init
in interface Adaptor
Exception
public void destroy()
This implementation does nothing.
destroy
in interface Adaptor
public static Application main(Adaptor adaptor, String[] args)
This method starts the HTTP server for serving doc contents, schedules
sending DocId
s on a schedule, and optionally sends DocId
s
on startup.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |