ResponseT
- Pojo response type.public final class ResponsePublisher<ResponseT extends SdkResponse> extends Object implements SdkPublisher<ByteBuffer>
SdkPublisher
that publishes response body content and also contains a reference to the SdkResponse
returned
by the service.AsyncResponseTransformer.toPublisher()
Constructor and Description |
---|
ResponsePublisher(ResponseT response,
SdkPublisher<ByteBuffer> publisher) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
ResponseT |
response() |
void |
subscribe(<any> subscriber)
Subscribes to the publisher with the given
Consumer . |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
adapt, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, limit, map
public ResponsePublisher(ResponseT response, SdkPublisher<ByteBuffer> publisher)
public ResponseT response()
public void subscribe(<any> subscriber)
SdkPublisher
Consumer
. This consumer will be called for each event
published. There is no backpressure using this method if the Consumer dispatches processing asynchronously. If more
control over backpressure is required, consider using #subscribe(Subscriber)
.subscribe
in interface SdkPublisher<ByteBuffer>
subscriber
- Consumer to process event.Copyright © 2022. All rights reserved.