Interface TypedContent<T,StreamType>
-
- Type Parameters:
T- the type of the resolved data (not streamed).StreamType- the type of each element of the stream.
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ByteArrayContent,EmptyContent,ListContent,ObjectContent,StringContent
public interface TypedContent<T,StreamType> extends Serializable
The type refers to the type of the resolved data. For example, the resolved data for StringContent is string, for ListContent is List, ObjectContent is the object type and so on. The stream type refers to the data generated by the stream. For List content the type is the type of the object in the List.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidconsume()Consumes the stream payload if it has not been consumed yet.Tdata()default TgetData()default MimeTypegetMimeType()default TypedPublisher<StreamType>getStream()default Class<StreamType>getStreamType()default Class<T>getType()booleanisStream()MimeTypemimeType()TypedPublisher<StreamType>stream()Class<StreamType>streamType()Class<T>type()
-
-
-
Method Detail
-
streamType
Class<StreamType> streamType()
-
getStreamType
default Class<StreamType> getStreamType()
-
mimeType
MimeType mimeType()
-
getMimeType
default MimeType getMimeType()
-
data
T data()
-
getData
default T getData()
-
stream
TypedPublisher<StreamType> stream()
-
getStream
default TypedPublisher<StreamType> getStream()
-
isStream
boolean isStream()
-
consume
void consume()
Consumes the stream payload if it has not been consumed yet. This method might be useful to call before cloning the message. E.g the fork component uses this method before invoking fork branches with a copy of the message.
-
-