Package io.micronaut.servlet.http
Class DefaultBodyBuilder
java.lang.Object
io.micronaut.servlet.http.DefaultBodyBuilder
- All Implemented Interfaces:
BodyBuilder
@Requires(classes={io.micronaut.json.tree.JsonNode.class,io.micronaut.json.codec.MapperMediaTypeCodec.class})
@Internal
@Singleton
public class DefaultBodyBuilder
extends Object
implements BodyBuilder
Default implementation of
BodyBuilder
.- Since:
- 4.0.0
- Author:
- Sergio del Amo
-
Constructor Summary
ConstructorDescriptionDefaultBodyBuilder
(io.micronaut.http.codec.MediaTypeCodecRegistry codecRegistry) -
Method Summary
Modifier and TypeMethodDescription@Nullable Object
buildBody
(@NonNull Callable<InputStream> bodySupplier, @NonNull io.micronaut.http.HttpRequest<?> request)
-
Constructor Details
-
DefaultBodyBuilder
public DefaultBodyBuilder(io.micronaut.http.codec.MediaTypeCodecRegistry codecRegistry)
-
-
Method Details
-
buildBody
@Nullable public @Nullable Object buildBody(@NonNull @NonNull Callable<InputStream> bodySupplier, @NonNull @NonNull io.micronaut.http.HttpRequest<?> request) - Specified by:
buildBody
in interfaceBodyBuilder
- Parameters:
bodySupplier
- The HTTP Body supplied as an Input Streamrequest
- The HTTP Request- Returns:
- An object representing the HTTP body or null
-