com.bigllc.retsiq.simpleclient
Class RawOutputResponseHandler

java.lang.Object
  extended by com.bigllc.retsiq.simpleclient.AbstractSearchResponseHandler
      extended by com.bigllc.retsiq.simpleclient.RawOutputResponseHandler
All Implemented Interfaces:
SearchResponseHandler

public class RawOutputResponseHandler
extends AbstractSearchResponseHandler

Search handler that outputs search records in the RETS search XML format.

Author:
Marc G. Smith

Field Summary
 
Fields inherited from class com.bigllc.retsiq.simpleclient.AbstractSearchResponseHandler
columnNameIndex, columns, currentRow, hasMoreRecords, path, query, recordCount, recordsInResponse, responseDelimiter, responseDelimiterHex, select, session
 
Constructor Summary
RawOutputResponseHandler(java.io.OutputStream out)
          The formated results will be written to the supplied output stream.
 
Method Summary
 void columnsChild(java.util.List<java.lang.String> columns)
          Override this method if derived handler wants to receive notification of columns().
 void countChild(int count)
          Override this method if derived handler wants to receive notification of count().
 void dataChild(SearchRecord record)
          Override this method if derived handler wants to receive notification of data().
 void delimiterChild(java.lang.String hex)
          Override this method if derived handler wants to receive notification of noRecordsFound().
 void done()
          Flushes output stream.
 void hasMoreDataChild()
          Override this method if derived handler wants to receive notification of hasMoreData().
 void responseCode(int code, java.lang.String text, java.lang.String description)
          Callback for search RETS response code.
 
Methods inherited from class com.bigllc.retsiq.simpleclient.AbstractSearchResponseHandler
columns, count, data, delimiter, getColumns, getHasMoreRecords, getPath, getQuery, getRecordCount, getRecordsInResponse, getResponseDelimiter, getResponseDelimiterHex, getSelect, getSession, hasMoreData, noRecordsFound, noRecordsFoundChild, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawOutputResponseHandler

public RawOutputResponseHandler(java.io.OutputStream out)
The formated results will be written to the supplied output stream. The supplied output stream will not be closed by the handler. It is the responsibility of the caller to close the stream.

Parameters:
out - The output stream that the formatted output is written to.
Method Detail

responseCode

public void responseCode(int code,
                         java.lang.String text,
                         java.lang.String description)
Description copied from interface: SearchResponseHandler
Callback for search RETS response code. A code of 0 represents search was successful, a code of 20201 means no records were found.

Specified by:
responseCode in interface SearchResponseHandler
Overrides:
responseCode in class AbstractSearchResponseHandler
Parameters:
code - The RETS response code.
text - The text associated with the response code.
description - An associated long description of the response code.
See Also:
SearchResponseHandler.responseCode(int, String, String)

countChild

public void countChild(int count)
Description copied from class: AbstractSearchResponseHandler
Override this method if derived handler wants to receive notification of count().

Overrides:
countChild in class AbstractSearchResponseHandler
See Also:
AbstractSearchResponseHandler.countChild(int)

delimiterChild

public void delimiterChild(java.lang.String hex)
Description copied from class: AbstractSearchResponseHandler
Override this method if derived handler wants to receive notification of noRecordsFound().

Overrides:
delimiterChild in class AbstractSearchResponseHandler
See Also:
AbstractSearchResponseHandler.delimiterChild(String)

columnsChild

public void columnsChild(java.util.List<java.lang.String> columns)
Description copied from class: AbstractSearchResponseHandler
Override this method if derived handler wants to receive notification of columns().

Overrides:
columnsChild in class AbstractSearchResponseHandler
See Also:
AbstractSearchResponseHandler.columnsChild(List)

dataChild

public void dataChild(SearchRecord record)
Description copied from class: AbstractSearchResponseHandler
Override this method if derived handler wants to receive notification of data().

Specified by:
dataChild in class AbstractSearchResponseHandler
See Also:
AbstractSearchResponseHandler.dataChild(SearchRecord)

hasMoreDataChild

public void hasMoreDataChild()
Description copied from class: AbstractSearchResponseHandler
Override this method if derived handler wants to receive notification of hasMoreData().

Overrides:
hasMoreDataChild in class AbstractSearchResponseHandler
See Also:
AbstractSearchResponseHandler.hasMoreDataChild()

done

public void done()
Flushes output stream.

Specified by:
done in interface SearchResponseHandler
Overrides:
done in class AbstractSearchResponseHandler
See Also:
SearchResponseHandler.done()