org.apache.nutch.searcher.response
Class ResponseWriters

java.lang.Object
  extended by org.apache.nutch.searcher.response.ResponseWriters

public class ResponseWriters
extends Object

Utility class for getting all ResponseWriter implementations and for returning the correct ResponseWriter for a given request type.


Constructor Summary
ResponseWriters(Configuration conf)
          Constructor that configures the cache of ResponseWriter objects.
 
Method Summary
 ResponseWriter getResponseWriter(String respType)
          Return the correct ResponseWriter object for the response type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseWriters

public ResponseWriters(Configuration conf)
Constructor that configures the cache of ResponseWriter objects.

Parameters:
conf - The Nutch configuration object.
Method Detail

getResponseWriter

public ResponseWriter getResponseWriter(String respType)
Return the correct ResponseWriter object for the response type.

Parameters:
respType - The response type, such as xml or json. Must correspond to the value set in the plugin.xml file for the ResponseWriter extension.
Returns:
The ResponseWriter that handles that response type or null if no such object exists.


Copyright © 2006 The Apache Software Foundation