AeroGear Android Libary 1.0.1

org.jboss.aerogear.android.pipeline.paging
Interface PageParameterExtractor<T extends PageConfig>

All Known Implementing Classes:
URIBodyPageParser, URIPageHeaderParser

public interface PageParameterExtractor<T extends PageConfig>

Classes which implement this interface are responsible for consuming a response from a server and extracting paging information (if any).


Method Summary
 ReadFilter getNextFilter(HeaderAndBody response, T config)
          Extracts a usable ReadFilter from the response of a server for the "next" result set.
 ReadFilter getPreviousFilter(HeaderAndBody response, T config)
          Extracts a usable ReadFilter from the response of a server for the "previous" result set.
 

Method Detail

getNextFilter

ReadFilter getNextFilter(HeaderAndBody response,
                         T config)
Extracts a usable ReadFilter from the response of a server for the "next" result set.

Parameters:
response - the server's response from a Pipe.read or Pipe.readWithFilter call.
config - the Pipe's PageConfig.
Returns:
a ReadFilter to be used to get the "next" page from Pipe.readWithFilter.

getPreviousFilter

ReadFilter getPreviousFilter(HeaderAndBody response,
                             T config)
Extracts a usable ReadFilter from the response of a server for the "previous" result set.

Parameters:
response - the server's response from a Pipe.read or Pipe.readWithFilter call.
config - the Pipe's PageConfig.
Returns:
a ReadFilter to be used to get the "previous" page from Pipe.readWithFilter.

AeroGear Android Libary 1.0.1

Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.