Class PagesResponseWriter

java.lang.Object
io.trino.server.PagesResponseWriter
All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<List<io.airlift.slice.Slice>>

@Provider @Produces("application/X-trino-pages") public class PagesResponseWriter extends Object implements jakarta.ws.rs.ext.MessageBodyWriter<List<io.airlift.slice.Slice>>
  • Field Details

    • SERIALIZED_PAGES_MAGIC

      public static final int SERIALIZED_PAGES_MAGIC
      See Also:
  • Constructor Details

    • PagesResponseWriter

      @Inject public PagesResponseWriter(FeaturesConfig featuresConfig)
  • Method Details

    • 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<List<io.airlift.slice.Slice>>
    • getSize

      public long getSize(List<io.airlift.slice.Slice> serializedPages, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      getSize in interface jakarta.ws.rs.ext.MessageBodyWriter<List<io.airlift.slice.Slice>>
    • writeTo

      public void writeTo(List<io.airlift.slice.Slice> serializedPages, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream output) throws IOException, jakarta.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface jakarta.ws.rs.ext.MessageBodyWriter<List<io.airlift.slice.Slice>>
      Throws:
      IOException
      jakarta.ws.rs.WebApplicationException