Package io.dropwizard.vavr.jersey
Class EitherMessageBodyWriter
java.lang.Object
io.dropwizard.vavr.jersey.EitherMessageBodyWriter
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<io.vavr.control.Either<?,?>>
@Provider
@Produces("*/*")
@Priority(2147483647)
public class EitherMessageBodyWriter
extends Object
implements jakarta.ws.rs.ext.MessageBodyWriter<io.vavr.control.Either<?,?>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(io.vavr.control.Either<?, ?> entity, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) voidwriteTo(io.vavr.control.Either<?, ?> entity, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
Constructor Details
-
EitherMessageBodyWriter
public EitherMessageBodyWriter()
-
-
Method Details
-
getSize
public long getSize(io.vavr.control.Either<?, ?> entity, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<io.vavr.control.Either<?,?>>
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein interfacejakarta.ws.rs.ext.MessageBodyWriter<io.vavr.control.Either<?,?>>
-
writeTo
public void writeTo(io.vavr.control.Either<?, ?> entity, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, throws IOExceptionObject> httpHeaders, OutputStream entityStream) - Specified by:
writeToin interfacejakarta.ws.rs.ext.MessageBodyWriter<io.vavr.control.Either<?,?>> - Throws:
IOException
-