org.eclipse.microprofile.reactive.messaging.Emitter Java Examples
The following examples show how to use
org.eclipse.microprofile.reactive.messaging.Emitter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ChannelProducer.java From smallrye-reactive-messaging with Apache License 2.0 | 5 votes |
@SuppressWarnings("rawtypes") private Emitter getEmitter(InjectionPoint injectionPoint) { String name = getChannelName(injectionPoint); Emitter emitter = channelRegistry.getEmitter(name); if (emitter == null) { throw ex.illegalStateForEmitter(name, channelRegistry.getEmitterNames()); } return emitter; }
Example #2
Source File: BeanWithMissingChannel.java From microprofile-reactive-messaging with Apache License 2.0 | 4 votes |
public Emitter<Message<String>> emitter() { return emitter; }
Example #3
Source File: ChannelEmitterWithOverflowAndBroadcast.java From quarkus with Apache License 2.0 | 4 votes |
@Inject public void setEmitter(@Channel("sink-1") @Broadcast Emitter<String> sink1, @Channel("sink-2") @Broadcast @OnOverflow(value = OnOverflow.Strategy.BUFFER, bufferSize = 4) Emitter<String> sink2) { this.emitterForSink1 = sink1; this.emitterForSink2 = sink2; }
Example #4
Source File: ChannelEmitterWithOverflow.java From quarkus with Apache License 2.0 | 4 votes |
@Inject public void setEmitter(@Channel("sink-1") Emitter<String> sink1, @Channel("sink-2") @OnOverflow(value = OnOverflow.Strategy.BUFFER, bufferSize = 4) Emitter<String> sink2) { this.emitterForSink1 = sink1; this.emitterForSink2 = sink2; }
Example #5
Source File: MyMessageBeanEmittingPayloadsWithAck.java From microprofile-reactive-messaging with Apache License 2.0 | 4 votes |
public Emitter<String> emitter() { return emitter; }
Example #6
Source File: MyBeanEmittingPayloadsWithAck.java From microprofile-reactive-messaging with Apache License 2.0 | 4 votes |
public Emitter<String> emitter() { return emitter; }
Example #7
Source File: MyBeanEmittingNull.java From microprofile-reactive-messaging with Apache License 2.0 | 4 votes |
public Emitter<String> emitter() { return emitter; }
Example #8
Source File: EmitterConnectedToProcessor.java From microprofile-reactive-messaging with Apache License 2.0 | 4 votes |
public Emitter<String> emitter() { return emitter; }
Example #9
Source File: MyBeanEmittingPayloads.java From microprofile-reactive-messaging with Apache License 2.0 | 4 votes |
public Emitter<String> emitter() { return emitter; }
Example #10
Source File: MyBeanEmittingMessages.java From microprofile-reactive-messaging with Apache License 2.0 | 4 votes |
public Emitter<String> emitter() { return emitter; }
Example #11
Source File: MyBeanEmittingDataAfterTerminationWithError.java From microprofile-reactive-messaging with Apache License 2.0 | 4 votes |
public Emitter<String> emitter() { return emitter; }
Example #12
Source File: MyBeanEmittingDataAfterTermination.java From microprofile-reactive-messaging with Apache License 2.0 | 4 votes |
public Emitter<String> emitter() { return emitter; }
Example #13
Source File: EmitterBean.java From smallrye-reactive-messaging with Apache License 2.0 | 4 votes |
public Emitter<String> emitter() { return emitter; }
Example #14
Source File: BeanEmitterBroadcast.java From smallrye-reactive-messaging with Apache License 2.0 | 4 votes |
public Emitter<String> emitter() { return emitter; }
Example #15
Source File: InternalChannelRegistry.java From smallrye-reactive-messaging with Apache License 2.0 | 4 votes |
@Override public synchronized Emitter<?> getEmitter(String name) { Objects.requireNonNull(name, msg.nameMustBeSet()); return emitters.get(name); }
Example #16
Source File: InternalChannelRegistry.java From smallrye-reactive-messaging with Apache License 2.0 | 4 votes |
@Override public synchronized void register(String name, Emitter<?> emitter) { Objects.requireNonNull(name, msg.nameMustBeSet()); Objects.requireNonNull(emitter, msg.emitterMustBeSet()); emitters.put(name, emitter); }
Example #17
Source File: ChannelProducer.java From smallrye-reactive-messaging with Apache License 2.0 | 3 votes |
/** * Injects an {@link io.smallrye.reactive.messaging.annotations.Emitter} (deprecated) matching the channel name. * * @param injectionPoint the injection point * @param <T> the type * @return the legacy emitter * @deprecated Use the new {@link Emitter} and {@link Channel} instead */ @Produces @io.smallrye.reactive.messaging.annotations.Channel("") // Stream name is ignored during type-safe resolution <T> io.smallrye.reactive.messaging.annotations.Emitter<T> produceEmitterLegacy( InjectionPoint injectionPoint) { LegacyEmitterImpl emitter = new LegacyEmitterImpl(getEmitter(injectionPoint)); return cast(emitter); }
Example #18
Source File: ChannelProducer.java From smallrye-reactive-messaging with Apache License 2.0 | 3 votes |
/** * Injects an {@link Emitter} matching the channel name. * * @param injectionPoint the injection point * @param <T> the type of the emitter * @return the emitter */ @Produces @Channel("") // Stream name is ignored during type-safe resolution <T> Emitter<T> produceEmitter(InjectionPoint injectionPoint) { Emitter emitter = getEmitter(injectionPoint); return cast(emitter); }
Example #19
Source File: ChannelRegistry.java From smallrye-reactive-messaging with Apache License 2.0 | votes |
void register(String name, Emitter<?> emitter);
Example #20
Source File: ChannelRegistry.java From smallrye-reactive-messaging with Apache License 2.0 | votes |
Emitter<?> getEmitter(String name);