AeroGear Android Library 1.1.0

org.jboss.aerogear.android.impl.pipeline.paging
Class URIBodyPageParser

java.lang.Object
  extended by org.jboss.aerogear.android.impl.pipeline.paging.URIBodyPageParser
All Implemented Interfaces:
PageParameterExtractor<PageConfig>

public class URIBodyPageParser
extends Object
implements PageParameterExtractor<PageConfig>

This class assumes the response body paging properties are URI's and parses them accordingly.


Constructor Summary
URIBodyPageParser()
           
URIBodyPageParser(URI uri)
           
URIBodyPageParser(URL url)
           
 
Method Summary
 ReadFilter getNextFilter(HeaderAndBody result, PageConfig config)
          Extracts a usable ReadFilter from the response of a server for the "next" result set.
 ReadFilter getPreviousFilter(HeaderAndBody result, PageConfig config)
          Extracts a usable ReadFilter from the response of a server for the "previous" result set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIBodyPageParser

public URIBodyPageParser(URI uri)

URIBodyPageParser

public URIBodyPageParser(URL url)

URIBodyPageParser

public URIBodyPageParser()
Method Detail

getNextFilter

public ReadFilter getNextFilter(HeaderAndBody result,
                                PageConfig config)
Description copied from interface: PageParameterExtractor
Extracts a usable ReadFilter from the response of a server for the "next" result set.

Specified by:
getNextFilter in interface PageParameterExtractor<PageConfig>
Parameters:
result - 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

public ReadFilter getPreviousFilter(HeaderAndBody result,
                                    PageConfig config)
Description copied from interface: PageParameterExtractor
Extracts a usable ReadFilter from the response of a server for the "previous" result set.

Specified by:
getPreviousFilter in interface PageParameterExtractor<PageConfig>
Parameters:
result - 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.