Package io.micronaut.http.server.netty
Class DefaultHttpContentProcessorResolver
java.lang.Object
io.micronaut.http.server.netty.DefaultHttpContentProcessorResolver
- All Implemented Interfaces:
HttpContentProcessorResolver
@Singleton
@Internal
public class DefaultHttpContentProcessorResolver
extends Object
implements HttpContentProcessorResolver
Default implementation that determines if the body argument (if present) does not expect
decoding of the request body, that the
DefaultHttpContentProcessor
should be used,
regardless of the content type of the request.
If the body argument dictates decoding should occur, the processor that corresponds to
the request content type will be returned.- Since:
- 1.3.0
- Author:
- James Kleeh
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
resolve
(@NonNull NettyHttpRequest<?> request) Resolves the processor for the given request.resolve
(@NonNull NettyHttpRequest<?> request, @NonNull Argument<?> bodyType) Resolves the processor for the given request and body argument.resolve
(@NonNull NettyHttpRequest<?> request, @NonNull RouteMatch<?> route) Deprecated.
-
Method Details
-
resolve
@NonNull @Deprecated public @NonNull HttpContentProcessor resolve(@NonNull @NonNull NettyHttpRequest<?> request, @NonNull @NonNull RouteMatch<?> route) Deprecated.Description copied from interface:HttpContentProcessorResolver
Resolves the processor for the given request and route.- Specified by:
resolve
in interfaceHttpContentProcessorResolver
- Parameters:
request
- The requestroute
- The matched route- Returns:
- The content processor
-
resolve
@NonNull public @NonNull HttpContentProcessor resolve(@NonNull @NonNull NettyHttpRequest<?> request, @NonNull @NonNull Argument<?> bodyType) Description copied from interface:HttpContentProcessorResolver
Resolves the processor for the given request and body argument.- Specified by:
resolve
in interfaceHttpContentProcessorResolver
- Parameters:
request
- The requestbodyType
- The body argument- Returns:
- The content processor
-
isRaw
-
resolve
@NonNull public @NonNull HttpContentProcessor resolve(@NonNull @NonNull NettyHttpRequest<?> request) Description copied from interface:HttpContentProcessorResolver
Resolves the processor for the given request.- Specified by:
resolve
in interfaceHttpContentProcessorResolver
- Parameters:
request
- The request- Returns:
- The content processor
-