Class MessageBuilder
- java.lang.Object
-
- de.codecentric.reedelk.runtime.api.message.MessageBuilder
-
public class MessageBuilder extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageBuilderattributes(MessageAttributes attributes)Messagebuild()MessageBuilderempty()static MessageBuilderget(Class<? extends Component> component)MessageBuilderwithBinary(byte[] bytes)MessageBuilderwithBinary(byte[] bytes, MimeType mimeType)MessageBuilderwithBinary(org.reactivestreams.Publisher<byte[]> bytesStream)MessageBuilderwithBinary(org.reactivestreams.Publisher<byte[]> bytesStream, MimeType mimeType)MessageBuilderwithHtml(String html)MessageBuilderwithHtml(org.reactivestreams.Publisher<String> htmlStream)MessageBuilderwithJavaObject(Object object)MessageBuilderwithJavaObject(Object object, MimeType mimeType)Note that the mime type is only used for non Java only types, e.g byte array and String.<ItemType> MessageBuilderwithJavaObject(reactor.core.publisher.Mono<ItemType> monoStream, Class<ItemType> type)MessageBuilderwithJson(String json)MessageBuilderwithJson(org.reactivestreams.Publisher<String> jsonStream)<ItemType> MessageBuilderwithList(List<ItemType> list, Class<ItemType> listItemType)MessageBuilderwithString(String value, MimeType mimeType)MessageBuilderwithString(org.reactivestreams.Publisher<String> valueStream, MimeType mimeType)MessageBuilderwithText(String text)MessageBuilderwithText(org.reactivestreams.Publisher<String> textStream)MessageBuilderwithTypedContent(TypedContent<?,?> typedContent)<StreamType>
MessageBuilderwithTypedPublisher(TypedPublisher<StreamType> typedPublisher)<StreamType>
MessageBuilderwithTypedPublisher(TypedPublisher<StreamType> typedPublisher, MimeType mimeType)MessageBuilderwithXml(String xml)MessageBuilderwithXml(org.reactivestreams.Publisher<String> xmlStream)
-
-
-
Method Detail
-
get
public static MessageBuilder get(Class<? extends Component> component)
-
withXml
public MessageBuilder withXml(String xml)
-
withXml
public MessageBuilder withXml(org.reactivestreams.Publisher<String> xmlStream)
-
withHtml
public MessageBuilder withHtml(String html)
-
withHtml
public MessageBuilder withHtml(org.reactivestreams.Publisher<String> htmlStream)
-
withText
public MessageBuilder withText(String text)
-
withText
public MessageBuilder withText(org.reactivestreams.Publisher<String> textStream)
-
withJson
public MessageBuilder withJson(String json)
-
withJson
public MessageBuilder withJson(org.reactivestreams.Publisher<String> jsonStream)
-
withString
public MessageBuilder withString(String value, MimeType mimeType)
-
withString
public MessageBuilder withString(org.reactivestreams.Publisher<String> valueStream, MimeType mimeType)
-
withBinary
public MessageBuilder withBinary(byte[] bytes)
-
withBinary
public MessageBuilder withBinary(byte[] bytes, MimeType mimeType)
-
withBinary
public MessageBuilder withBinary(org.reactivestreams.Publisher<byte[]> bytesStream)
-
withBinary
public MessageBuilder withBinary(org.reactivestreams.Publisher<byte[]> bytesStream, MimeType mimeType)
-
withTypedPublisher
public <StreamType> MessageBuilder withTypedPublisher(TypedPublisher<StreamType> typedPublisher)
-
withTypedPublisher
public <StreamType> MessageBuilder withTypedPublisher(TypedPublisher<StreamType> typedPublisher, MimeType mimeType)
-
withJavaObject
public MessageBuilder withJavaObject(Object object)
-
withJavaObject
public <ItemType> MessageBuilder withJavaObject(reactor.core.publisher.Mono<ItemType> monoStream, Class<ItemType> type)
-
withJavaObject
public MessageBuilder withJavaObject(Object object, MimeType mimeType)
Note that the mime type is only used for non Java only types, e.g byte array and String. For Java only types the mime type used is only MimeType.APPLICATION_JAVA. This is because it would not make sense to have a Java object with mime type MimeType.APPLICATION_JSON.
-
withTypedContent
public MessageBuilder withTypedContent(TypedContent<?,?> typedContent)
-
withList
public <ItemType> MessageBuilder withList(List<ItemType> list, Class<ItemType> listItemType)
-
empty
public MessageBuilder empty()
-
attributes
public MessageBuilder attributes(MessageAttributes attributes)
-
build
public Message build()
-
-