Package io.micronaut.jaxrs.common
Class JaxRsMessageBodyWriter<T>
java.lang.Object
io.micronaut.jaxrs.common.JaxRsMessageBodyWriter<T>
- Type Parameters:
T
- The type
- All Implemented Interfaces:
MessageBodyWriter<T>
@Internal
@Singleton
@EachBean(value=jakarta.ws.rs.ext.MessageBodyWriter.class,
remapGenerics=)
public final class JaxRsMessageBodyWriter<T>
extends Object
implements MessageBodyWriter<T>
The reader remapped
MessageBodyWriter
.- Since:
- 4.6.0
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorDescriptionJaxRsMessageBodyWriter
(BeanRegistration<MessageBodyWriter<T>> beanRegistration, List<WriterInterceptor> writerInterceptors) JaxRsMessageBodyWriter
(AnnotationMetadata annotationMetadata, MessageBodyWriter<T> delegate, List<WriterInterceptor> writerInterceptors) JaxRsMessageBodyWriter
(Argument<?> writerArgument, MessageBodyWriter<T> delegate, List<WriterInterceptor> writerInterceptors) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.body.MessageBodyWriter
createSpecific, isBlocking, writeTo
-
Constructor Details
-
JaxRsMessageBodyWriter
@Inject public JaxRsMessageBodyWriter(BeanRegistration<MessageBodyWriter<T>> beanRegistration, List<WriterInterceptor> writerInterceptors) -
JaxRsMessageBodyWriter
public JaxRsMessageBodyWriter(AnnotationMetadata annotationMetadata, MessageBodyWriter<T> delegate, List<WriterInterceptor> writerInterceptors) -
JaxRsMessageBodyWriter
public JaxRsMessageBodyWriter(Argument<?> writerArgument, MessageBodyWriter<T> delegate, List<WriterInterceptor> writerInterceptors)
-
-
Method Details
-
isWriteable
public boolean isWriteable(@NonNull @NonNull Argument<T> type, @Nullable @Nullable MediaType mediaType) - Specified by:
isWriteable
in interfaceMessageBodyWriter<T>
-
writeTo
public void writeTo(@NonNull @NonNull Argument<T> type, @NonNull @NonNull MediaType mediaType, T object, @NonNull @NonNull MutableHeaders outgoingHeaders, @NonNull @NonNull OutputStream outputStream) throws CodecException - Specified by:
writeTo
in interfaceMessageBodyWriter<T>
- Throws:
CodecException
-