javastrava.util.PagingCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javastrava-api Show documentation
Show all versions of javastrava-api Show documentation
Java implementation of the Strava API
The newest version!
package javastrava.util;
import java.util.List;
import javastrava.service.exception.BadRequestException;
import javastrava.service.exception.NotFoundException;
/**
*
* Implement this interface in an anonymous inner class, magically get {@link PagingHandler} to work!
*
*
* @author Dan Shannon
* @param
* Class of the object in the list to be returned
*
*/
public interface PagingCallback {
/**
* @param thisPage The page of data to be returned
* @return Page of data
* @throws NotFoundException If the thing being paged itself throws a {@link NotFoundException}
* @throws BadRequestException If the paging instructions are invalid
*/
public List getPageOfData(final Paging thisPage) throws NotFoundException, BadRequestException;
}