T
- We use JsonObject, JsonArray and Bufferpublic abstract class AbstractEventBusResponseSubscriber<T> extends java.lang.Object implements EventBusResponseSubscriber<T>
Observer that starts sending back data retrieved from a subscription onto the eventbus
Modifier and Type | Field and Description |
---|---|
protected io.reactivex.functions.Cancellable |
cancellable |
protected static org.slf4j.Logger |
logger |
Modifier | Constructor and Description |
---|---|
protected |
AbstractEventBusResponseSubscriber(io.vertx.core.Vertx vertx,
io.vertx.core.MultiMap headers,
KeepUser user) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getApiName() |
java.lang.String |
getOperationId() |
protected abstract java.util.stream.Collector<T,?,?> |
getSendCollector() |
KeepUser |
getUser() |
boolean |
isDisposed() |
void |
onComplete() |
void |
onError(java.lang.Throwable error) |
void |
onNext(T data) |
void |
onSubscribe(io.reactivex.disposables.Disposable d) |
io.reactivex.ObservableEmitter<T> |
serialize() |
void |
setAggregateResponses(int aggregateResponses)
Sets the batch count of responses to be bundled over the eventbus 0 = no bundling -1 = all (single response)
|
void |
setCacheHeader(java.lang.String cacheKey) |
void |
setCancellable(io.reactivex.functions.Cancellable c) |
void |
setDisposable(io.reactivex.disposables.Disposable d) |
boolean |
tryOnError(java.lang.Throwable t) |
protected static final org.slf4j.Logger logger
protected transient io.reactivex.functions.Cancellable cancellable
protected AbstractEventBusResponseSubscriber(@Nonnull io.vertx.core.Vertx vertx, @Nonnull io.vertx.core.MultiMap headers, @Nonnull KeepUser user) throws KeepExceptionServer
KeepExceptionServer
public java.lang.String getApiName()
getApiName
in interface KeepSubscriberInfo
public java.lang.String getOperationId()
public KeepUser getUser()
getUser
in interface KeepSubscriberInfo
public boolean isDisposed()
isDisposed
in interface io.reactivex.ObservableEmitter<T>
public void onComplete()
public void onError(java.lang.Throwable error)
public void onNext(T data)
public void onSubscribe(io.reactivex.disposables.Disposable d)
onSubscribe
in interface io.reactivex.Observer<T>
public io.reactivex.ObservableEmitter<T> serialize()
serialize
in interface io.reactivex.ObservableEmitter<T>
public void setAggregateResponses(int aggregateResponses)
EventBusResponseSubscriber
Sets the batch count of responses to be bundled over the eventbus 0 = no bundling -1 = all (single response)
0 = the given number
setAggregateResponses
in interface EventBusResponseSubscriber<T>
aggregateResponses
- public void setCacheHeader(java.lang.String cacheKey)
cacheKey
- public void setCancellable(io.reactivex.functions.Cancellable c)
setCancellable
in interface io.reactivex.ObservableEmitter<T>
public void setDisposable(io.reactivex.disposables.Disposable d)
setDisposable
in interface io.reactivex.ObservableEmitter<T>
public boolean tryOnError(java.lang.Throwable t)
tryOnError
in interface io.reactivex.ObservableEmitter<T>
protected abstract java.util.stream.Collector<T,?,?> getSendCollector()