Class AbstractMediator
- java.lang.Object
-
- io.smallrye.reactive.messaging.providers.AbstractMediator
-
- Direct Known Subclasses:
ProcessorMediator
,PublisherMediator
,StreamTransformerMediator
,SubscriberMediator
public abstract class AbstractMediator extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected MediatorConfiguration
configuration
protected HealthCenter
health
protected WorkerPoolRegistry
workerPoolRegistry
-
Constructor Summary
Constructors Constructor Description AbstractMediator(MediatorConfiguration configuration)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description MediatorConfiguration
configuration()
void
connectToUpstream(io.smallrye.mutiny.Multi<? extends Message<?>> publisher)
io.smallrye.mutiny.Multi<? extends Message<?>>
convert(io.smallrye.mutiny.Multi<? extends Message<?>> upstream)
io.smallrye.mutiny.Multi<? extends Message<?>>
decorate(io.smallrye.mutiny.Multi<? extends Message<?>> input)
protected CompletionStage<Message<?>>
getAckOrCompletion(Message<?> message)
org.reactivestreams.Subscriber<Message<?>>
getComputedSubscriber()
MediatorConfiguration
getConfiguration()
String
getMethodAsString()
io.smallrye.mutiny.Multi<? extends Message<?>>
getStream()
protected CompletionStage<Message<?>>
handlePreProcessingAck(Message<?> message)
void
initialize(Object bean)
protected <T> T
invoke(Object... args)
protected <T> io.smallrye.mutiny.Uni<T>
invokeBlocking(Object... args)
abstract boolean
isConnected()
protected Function<Message<?>,? extends CompletionStage<? extends Message<?>>>
managePreProcessingAck()
void
run()
void
setConverters(javax.enterprise.inject.Instance<MessageConverter> converters)
void
setDecorators(javax.enterprise.inject.Instance<PublisherDecorator> decorators)
void
setHealth(HealthCenter health)
void
setInvoker(Invoker invoker)
void
setWorkerPoolRegistry(WorkerPoolRegistry workerPoolRegistry)
-
-
-
Field Detail
-
configuration
protected final MediatorConfiguration configuration
-
workerPoolRegistry
protected WorkerPoolRegistry workerPoolRegistry
-
health
protected HealthCenter health
-
-
Constructor Detail
-
AbstractMediator
public AbstractMediator(MediatorConfiguration configuration)
-
-
Method Detail
-
setInvoker
public void setInvoker(Invoker invoker)
-
setDecorators
public void setDecorators(javax.enterprise.inject.Instance<PublisherDecorator> decorators)
-
setConverters
public void setConverters(javax.enterprise.inject.Instance<MessageConverter> converters)
-
setWorkerPoolRegistry
public void setWorkerPoolRegistry(WorkerPoolRegistry workerPoolRegistry)
-
run
public void run()
-
connectToUpstream
public void connectToUpstream(io.smallrye.mutiny.Multi<? extends Message<?>> publisher)
-
configuration
public MediatorConfiguration configuration()
-
initialize
public void initialize(Object bean)
-
invoke
protected <T> T invoke(Object... args)
-
invokeBlocking
protected <T> io.smallrye.mutiny.Uni<T> invokeBlocking(Object... args)
-
getAckOrCompletion
protected CompletionStage<Message<?>> getAckOrCompletion(Message<?> message)
-
getStream
public io.smallrye.mutiny.Multi<? extends Message<?>> getStream()
-
getConfiguration
public MediatorConfiguration getConfiguration()
-
getMethodAsString
public String getMethodAsString()
-
getComputedSubscriber
public org.reactivestreams.Subscriber<Message<?>> getComputedSubscriber()
-
isConnected
public abstract boolean isConnected()
-
managePreProcessingAck
protected Function<Message<?>,? extends CompletionStage<? extends Message<?>>> managePreProcessingAck()
-
handlePreProcessingAck
protected CompletionStage<Message<?>> handlePreProcessingAck(Message<?> message)
-
decorate
public io.smallrye.mutiny.Multi<? extends Message<?>> decorate(io.smallrye.mutiny.Multi<? extends Message<?>> input)
-
setHealth
public void setHealth(HealthCenter health)
-
-