Class JsonHttpContentSubscriberFactory
java.lang.Object
io.micronaut.http.server.netty.jackson.JsonHttpContentSubscriberFactory
- All Implemented Interfaces:
HttpContentSubscriberFactory
@Consumes({"application/x-json-stream","application/json"})
@Singleton
@Internal
public class JsonHttpContentSubscriberFactory
extends Object
implements HttpContentSubscriberFactory
Builds the
Subscriber
for JSON requests.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
ConstructorDescriptionJsonHttpContentSubscriberFactory
(JsonMapper jsonMapper, NettyHttpServerConfiguration httpServerConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionbuild
(NettyHttpRequest request) Build aSubscriber
for the given request.
-
Constructor Details
-
JsonHttpContentSubscriberFactory
public JsonHttpContentSubscriberFactory(JsonMapper jsonMapper, NettyHttpServerConfiguration httpServerConfiguration) - Parameters:
jsonMapper
- The object codec to use configuration fromhttpServerConfiguration
- The Http server configuration
-
-
Method Details
-
build
Description copied from interface:HttpContentSubscriberFactory
Build aSubscriber
for the given request.- Specified by:
build
in interfaceHttpContentSubscriberFactory
- Parameters:
request
- The request- Returns:
- The subscriber
-