File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
ds3-sdk/src/main/java/com/spectralogic/ds3client/helpers/pagination Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 2121import java .io .IOException ;
2222import java .util .List ;
2323
24+ /**
25+ * This interface is used to implement the call specific logic for any Spectra S3 paginated request.
26+ * @param <E> The type the iterator will return.
27+ * @param <T> The {@link AbstractPaginationRequest} that the command will invoke
28+ * @param <F> The {@link AbstractPaginationResponse} that will be returned by the {@link AbstractPaginationRequest}
29+ */
2430public interface PaginatingCommand <E , T extends AbstractPaginationRequest , F extends AbstractPaginationResponse > {
31+ /**
32+ * Creates an initial request. This should not modify any of the pagination values for the request
33+ */
2534 T createRequest ();
35+
36+ /**
37+ * Invokes the request and returns the response
38+ */
2639 F invokeCommand (final T paginationRequest ) throws IOException ;
40+
41+ /**
42+ * Parses the response into the correct payload to be consumed by the iterator
43+ */
2744 List <E > getResponseContents (F response );
2845}
You can’t perform that action at this time.
0 commit comments