org.jboss.aerogear.android.impl.pipeline.paging
Class URIBodyPageParser
java.lang.Object
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URIBodyPageParser
public URIBodyPageParser(URI uri)
URIBodyPageParser
public URIBodyPageParser(URL url)
URIBodyPageParser
public URIBodyPageParser()
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.
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.