Provides a description of the certificate.
This is a variant of
#describeCertificates(software.amazon.awssdk.services.databasemigration.model.DescribeCertificatesRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new
org.reactivestreams.Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.databasemigration.paginators.DescribeCertificatesPublisher publisher = client.describeCertificatesPaginator(request);CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
future.get();
}
2) Using a custom subscriber
software.amazon.awssdk.services.databasemigration.paginators.DescribeCertificatesPublisher publisher = client.describeCertificatesPaginator(request);public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeCertificatesResponse response) { //... };
});}
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
#describeCertificates(software.amazon.awssdk.services.databasemigration.model.DescribeCertificatesRequest)operation.