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 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:
      getSize in interface jakarta.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:
      isWriteable in interface jakarta.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,Object> httpHeaders, OutputStream entityStream) throws IOException
      Specified by:
      writeTo in interface jakarta.ws.rs.ext.MessageBodyWriter<io.vavr.control.Either<?,?>>
      Throws:
      IOException