public class MetadataExplorer extends AbstractAdaptor
| Constructor and Description |
|---|
MetadataExplorer() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
init(AdaptorContext context)
Initialize adaptor with the current context.
|
static void |
main(String[] args)
Call default main for adaptors.
|
destroy, initConfig, mainpublic void init(AdaptorContext context) throws Exception
AbstractAdaptorcontext
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(java.lang.Runnable).
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 Adaptorinit in class AbstractAdaptorcontext - for instance includes completed configException - if things are not going wellpublic void getDocIds(DocIdPusher pusher) throws InterruptedException
pusher - used to send doc ids to GSAInterruptedException - if an IO operations throws itpublic void getDocContent(Request req, Response resp) throws IOException
req - info about document being soughtresp - place to put document dataIOException - if getting data failspublic static void main(String[] args)
args - argv