public static < E , V > ServiceFuture < List < E > > fromHeaderPageResponse ( Observable < ServiceResponseWithHeaders < Page < E > , V > > first , final Func1 < String , Observable < ServiceResponseWithHeaders < Page < E > , V > > > next , final ListOperationCallback < E > callback ) { final AzureServiceFuture < List < E > > serviceCall = new AzureServiceFuture <> ( ) ; final PagingSubscriber < E > subscriber = new PagingSubscriber <> ( serviceCall , new Func1 < String , Observable < ServiceResponse < Page < E > > > > ( ) { @ Override public Observable < ServiceResponse < Page < E > > > call ( String s ) { return next . call ( s ) . map ( new Func1 < ServiceResponseWithHeaders < Page < E > , V > , ServiceResponse < Page < E > > > ( ) { @ Override public ServiceResponse < Page < E > > call ( ServiceResponseWithHeaders < Page < E > , V > pageVServiceResponseWithHeaders ) { return pageVServiceResponseWithHeaders ; } } ) ; } } , callback ) ; serviceCall . setSubscription ( first . single ( ) . subscribe ( subscriber ) ) ; return serviceCall ; }
Creates a ServiceCall from a paging operation that returns a header response .