AeroGear Android Library 1.1.0

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 call.
config - the Pipe's PageConfig.
Returns:
a ReadFilter to be used to get the "next" page from Pipe.read.

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 call.
config - the Pipe's PageConfig.
Returns:
a ReadFilter to be used to get the "previous" page from Pipe.read.

AeroGear Android Library 1.1.0

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.