public class PagingDelegateWrapper<T> extends PagingDelegate<T>
PagingDelegate takes care of enforcing some basic
behaviour of the delegate contract so that users don't have to. Concerns such as
logging, auto closing the delegate if the consumer has been fully consumed, etc
are addressed here| Constructor and Description |
|---|
PagingDelegateWrapper(PagingDelegate<T> wrapped) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the resource.
|
List<T> |
getPage()
Returns the next page of items.
|
int |
getTotalResults()
returns the total amount of items in the unpaged resultset.
|
public PagingDelegateWrapper(PagingDelegate<T> wrapped)
public List<T> getPage()
null or an
empty list, then it means no more items are available This implementation already takes care of returning
null if the delegate is closed or if the obtained page is
null or empty. It delegates into the wrapped instance to actually
obtain the page.getPage in class PagingDelegate<T>null or an empty list, then
it means no more items are availablepublic void close()
throws MuleException
MuleException - if an exception occurs closing the resourcepublic int getTotalResults()
getTotalResults in class PagingDelegate<T>Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.