Class PlainTextMessageBodyProducer

java.lang.Object
org.apache.hadoop.hbase.rest.provider.producer.PlainTextMessageBodyProducer
All Implemented Interfaces:
org.apache.hbase.thirdparty.javax.ws.rs.ext.MessageBodyWriter<Object>

@Provider @Produces("text/plain") @Private public class PlainTextMessageBodyProducer extends Object implements org.apache.hbase.thirdparty.javax.ws.rs.ext.MessageBodyWriter<Object>
An adapter between Jersey and Object.toString(). Hooks up plain text output to the Jersey content handling framework. Jersey will first call getSize() to learn the number of bytes that will be sent, then writeTo to perform the actual I/O.
  • Constructor Details

  • Method Details

    • isWriteable

      public boolean isWriteable(Class<?> arg0, Type arg1, Annotation[] arg2, org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType arg3)
      Specified by:
      isWriteable in interface org.apache.hbase.thirdparty.javax.ws.rs.ext.MessageBodyWriter<Object>
    • getSize

      public long getSize(Object object, Class<?> type, Type genericType, Annotation[] annotations, org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType mediaType)
      Specified by:
      getSize in interface org.apache.hbase.thirdparty.javax.ws.rs.ext.MessageBodyWriter<Object>
    • writeTo

      public void writeTo(Object object, Class<?> type, Type genericType, Annotation[] annotations, org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType mediaType, org.apache.hbase.thirdparty.javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream outStream) throws IOException, org.apache.hbase.thirdparty.javax.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface org.apache.hbase.thirdparty.javax.ws.rs.ext.MessageBodyWriter<Object>
      Throws:
      IOException
      org.apache.hbase.thirdparty.javax.ws.rs.WebApplicationException