AeroGear Android Library 1.1.0

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

java.lang.Object
  extended by org.jboss.aerogear.android.impl.pipeline.paging.URIPageHeaderParser
All Implemented Interfaces:
PageParameterExtractor

public class URIPageHeaderParser
extends Object
implements PageParameterExtractor

This class assumes the header responses in a response are URI's and parses them accordingly.


Constructor Summary
URIPageHeaderParser()
           
URIPageHeaderParser(URI uri)
           
URIPageHeaderParser(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

URIPageHeaderParser

public URIPageHeaderParser(URI uri)

URIPageHeaderParser

public URIPageHeaderParser(URL url)

URIPageHeaderParser

public URIPageHeaderParser()
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
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
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.