Class PagesResponseWriter

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyWriter<List<io.airlift.slice.Slice>>

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

    • Constructor Detail

      • PagesResponseWriter

        @Inject
        public PagesResponseWriter​(FeaturesConfig featuresConfig)
    • Method Detail

      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface javax.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,
                            javax.ws.rs.core.MediaType mediaType)
        Specified by:
        getSize in interface javax.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,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                            OutputStream output)
                     throws IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<List<io.airlift.slice.Slice>>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException