org.apache.solr.response
Class GenericTextResponseWriter

java.lang.Object
  extended by org.apache.solr.response.BaseResponseWriter
      extended by org.apache.solr.response.GenericTextResponseWriter
All Implemented Interfaces:
QueryResponseWriter, NamedListInitializedPlugin

Deprecated. use TextResponseWriter see SOLR-2485

public abstract class GenericTextResponseWriter
extends BaseResponseWriter
implements QueryResponseWriter

A generic QueryResponseWriter implementation that requires a user to implement the getSingleResponseWriter(Writer, SolrQueryRequest, SolrQueryResponse) that defines a BaseResponseWriter.SingleResponseWriter to handle plain ol' text output.

Since:
1.5
Version:
$Id: GenericTextResponseWriter.java 1098906 2011-05-03 05:02:02Z ryan $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.solr.response.BaseResponseWriter
BaseResponseWriter.DocListInfo, BaseResponseWriter.SingleResponseWriter
 
Field Summary
 
Fields inherited from interface org.apache.solr.response.QueryResponseWriter
CONTENT_TYPE_TEXT_ASCII, CONTENT_TYPE_TEXT_UTF8, CONTENT_TYPE_XML_UTF8
 
Constructor Summary
GenericTextResponseWriter()
          Deprecated.  
 
Method Summary
protected abstract  BaseResponseWriter.SingleResponseWriter getSingleResponseWriter(Writer writer, SolrQueryRequest request, SolrQueryResponse response)
          Deprecated. Users of this class should implement this method to define a BaseResponseWriter.SingleResponseWriter responsible for writing text output given a SolrDocumentList or doc-by-doc, given a SolrInputDocument.
 void write(Writer writer, SolrQueryRequest request, SolrQueryResponse response)
          Deprecated. Writes text output using the BaseResponseWriter.SingleResponseWriter provided by a call to getSingleResponseWriter(Writer, SolrQueryRequest, SolrQueryResponse) .
 
Methods inherited from class org.apache.solr.response.BaseResponseWriter
init, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.solr.response.QueryResponseWriter
getContentType, init
 

Constructor Detail

GenericTextResponseWriter

public GenericTextResponseWriter()
Deprecated. 
Method Detail

write

public void write(Writer writer,
                  SolrQueryRequest request,
                  SolrQueryResponse response)
           throws IOException
Deprecated. 
Writes text output using the BaseResponseWriter.SingleResponseWriter provided by a call to getSingleResponseWriter(Writer, SolrQueryRequest, SolrQueryResponse) .

Specified by:
write in interface QueryResponseWriter
Parameters:
writer - The Writer to write the text output to.
request - The provided SolrQueryRequest.
response - The provided SolrQueryResponse.
Throws:
IOException

getSingleResponseWriter

protected abstract BaseResponseWriter.SingleResponseWriter getSingleResponseWriter(Writer writer,
                                                                                   SolrQueryRequest request,
                                                                                   SolrQueryResponse response)
Deprecated. 
Users of this class should implement this method to define a BaseResponseWriter.SingleResponseWriter responsible for writing text output given a SolrDocumentList or doc-by-doc, given a SolrInputDocument.

Parameters:
writer - The Writer to write the text data response to.
request - The provided SolrQueryRequest.
response - The provided SolrQueryResponse.
Returns:
A BaseResponseWriter.SingleResponseWriter that will be used to generate the response output from this QueryResponseWriter.