Java Code Examples for org.eclipse.microprofile.reactive.streams.operators.ReactiveStreams#of()

The following examples show how to use org.eclipse.microprofile.reactive.streams.operators.ReactiveStreams#of() . 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: PersonProducerBean.java    From smallrye-reactive-messaging with Apache License 2.0 5 votes vote down vote up
@Outgoing("queue-one")
public PublisherBuilder<Person> producer() {
    return ReactiveStreams.of(
            new Person("bob", 20),
            new Person("tom", 18),
            new Person("phil", 30));
}
 
Example 2
Source File: PublisherBuilderPropagationTest.java    From smallrye-reactive-messaging with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Incoming("intermediate")
@Outgoing("sink")
public PublisherBuilder<Message<String>> process(Message<String> input) {
    return ReactiveStreams.of(
            input.withMetadata(input.getMetadata().with(new MessageTest.MyMetadata<>("hello"))),
            input.withMetadata(input.getMetadata().with(new MessageTest.MyMetadata<>("hello"))));
}
 
Example 3
Source File: PublisherBean.java    From microprofile-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("publisher-for-processor-publisher-message")
public PublisherBuilder<Integer> streamForProcessorOfMessages() {
    return ReactiveStreams.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
}
 
Example 4
Source File: ProcessorBean.java    From microprofile-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("publisher-for-processor-builder-payload")
public PublisherBuilder<Integer> streamForProcessorBuilderOfPayloads() {
  return ReactiveStreams.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
}
 
Example 5
Source File: ProcessorBean.java    From microprofile-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("publisher-for-processor-builder-message")
public PublisherBuilder<Integer> streamForProcessorBuilderOfMessages() {
  return ReactiveStreams.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
}
 
Example 6
Source File: TransformerBean.java    From microprofile-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("publisher-for-publisher-message")
public PublisherBuilder<Integer> streamForProcessorOfMessages() {
  return ReactiveStreams.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
}
 
Example 7
Source File: ProcessorBean.java    From microprofile-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("publisher-for-processor-message")
public PublisherBuilder<Integer> streamForProcessorOfMessages() {
  return ReactiveStreams.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
}
 
Example 8
Source File: BeanWithChain.java    From microprofile-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("source")
public PublisherBuilder<String> source() {
  return ReactiveStreams.of("hello", "with","MicroProfile", "reactive", "messaging");
}
 
Example 9
Source File: SourceBean.java    From microprofile-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("raw")
public PublisherBuilder<String> raw() {
    return ReactiveStreams.of("b", "o", "n", "j", "o", "u", "r");
}
 
Example 10
Source File: DirectProcessorBean.java    From microprofile-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("publisher-synchronous-payload")
public PublisherBuilder<Integer> streamForProcessorOfPayloads() {
  return ReactiveStreams.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
}
 
Example 11
Source File: PublisherBuilderPropagationTest.java    From smallrye-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Incoming("source")
@Outgoing("intermediate")
public PublisherBuilder<String> process(String payload) {
    return ReactiveStreams.of(payload, payload);
}
 
Example 12
Source File: TransformerBean.java    From microprofile-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("publisher-for-publisher-payload")
public PublisherBuilder<Integer> streamForProcessorOfPayloads() {
  return ReactiveStreams.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
}
 
Example 13
Source File: InvalidConfigurationTest.java    From smallrye-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("")
public PublisherBuilder<String> source() {
    return ReactiveStreams.of("a", "b", "c");
}
 
Example 14
Source File: MetricsTestBean.java    From smallrye-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Incoming("source")
@Outgoing("sink")
public PublisherBuilder<String> duplicate(String input) {
    return ReactiveStreams.of(input, input);
}
 
Example 15
Source File: BeanQualifierTest.java    From smallrye-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("source")
public PublisherBuilder<String> source() {
    return ReactiveStreams.of("hello", "with", "SmallRye", "reactive", "message");
}
 
Example 16
Source File: Main.java    From smallrye-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("source")
public PublisherBuilder<String> source() {
    return ReactiveStreams.of("hello", "with", "SmallRye", "reactive", "message");
}
 
Example 17
Source File: DirectProcessorBean.java    From microprofile-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("publisher-asynchronous-message")
public PublisherBuilder<Integer> streamForProcessorBuilderOfMessages() {
  return ReactiveStreams.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
}
 
Example 18
Source File: PublisherBean.java    From microprofile-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Outgoing("publisher-for-processor-publisher-payload")
public PublisherBuilder<Integer> streamForProcessorOfPayloads() {
    return ReactiveStreams.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
}
 
Example 19
Source File: PublisherSignatureTest.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Outgoing("D")
public PublisherBuilder<Integer> produce() {
    return ReactiveStreams.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
}
 
Example 20
Source File: Operators.java    From smallrye-reactive-streams-operators with Apache License 2.0 4 votes vote down vote up
public <T> void of(T t1, T t2, T t3) {
    // tag::of[]
    PublisherBuilder<T> streamOfOne = ReactiveStreams.of(t1);
    PublisherBuilder<T> streamOfThree = ReactiveStreams.of(t1, t2, t3);
    // end::of[]
}