Class TestResourcesBodyHandler<T>
java.lang.Object
io.micronaut.testresources.codec.TestResourcesBodyHandler<T>
- Type Parameters:
T- The argument type
- All Implemented Interfaces:
io.micronaut.http.body.MessageBodyHandler<T>, io.micronaut.http.body.MessageBodyReader<T>, io.micronaut.http.body.MessageBodyWriter<T>
@Singleton
@Consumes("application/x-test-resources+binary")
@Produces("application/x-test-resources+binary")
public class TestResourcesBodyHandler<T>
extends Object
implements io.micronaut.http.body.MessageBodyHandler<T>
Message body handler for the test resources binary protocol.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisReadable(io.micronaut.core.type.Argument<T> type, io.micronaut.http.MediaType mediaType) booleanisWriteable(io.micronaut.core.type.Argument<T> type, io.micronaut.http.MediaType mediaType) read(io.micronaut.core.type.Argument<T> type, io.micronaut.http.MediaType mediaType, io.micronaut.core.type.Headers httpHeaders, InputStream inputStream) voidwriteTo(io.micronaut.core.type.Argument<T> type, io.micronaut.http.MediaType mediaType, T object, io.micronaut.core.type.MutableHeaders outgoingHeaders, OutputStream outputStream) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.http.body.MessageBodyReader
readMethods inherited from interface io.micronaut.http.body.MessageBodyWriter
createSpecific, isBlocking, writeTo
-
Constructor Details
-
TestResourcesBodyHandler
public TestResourcesBodyHandler()
-
-
Method Details
-
isReadable
-
isWriteable
-
read
public T read(io.micronaut.core.type.Argument<T> type, io.micronaut.http.MediaType mediaType, io.micronaut.core.type.Headers httpHeaders, InputStream inputStream) throws io.micronaut.http.codec.CodecException - Specified by:
readin interfaceio.micronaut.http.body.MessageBodyReader<T>- Throws:
io.micronaut.http.codec.CodecException
-
writeTo
public void writeTo(io.micronaut.core.type.Argument<T> type, io.micronaut.http.MediaType mediaType, T object, io.micronaut.core.type.MutableHeaders outgoingHeaders, OutputStream outputStream) throws io.micronaut.http.codec.CodecException - Specified by:
writeToin interfaceio.micronaut.http.body.MessageBodyWriter<T>- Throws:
io.micronaut.http.codec.CodecException
-