
io.numaproj.numaflow.sourcetransformer.MessageList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of numaflow-java Show documentation
Show all versions of numaflow-java Show documentation
SDK to implement Numaflow Source or User Defined Functions or Sinks in Java.
The newest version!
package io.numaproj.numaflow.sourcetransformer;
import lombok.Builder;
import lombok.Getter;
import lombok.Singular;
import java.util.ArrayList;
import java.util.List;
/**
* MessageList is used to return the list of Messages from SourceTransformer functions.
*/
@Getter
@Builder(builderMethodName = "newBuilder")
public class MessageList {
@Singular("addMessage")
private List messages;
/**
* Builder to build MessageList
*/
public static class MessageListBuilder {
/**
* @param messages to append all the messages to MessageList
*
* @return returns the builder
*/
public MessageListBuilder addAllMessages(Iterable messages) {
if (this.messages == null) {
this.messages = new ArrayList<>();
}
for (Message message : messages) {
this.messages.add(message);
}
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy