org.apache.hadoop.lib.wsrs
Class JSONProvider

java.lang.Object
  extended by org.apache.hadoop.lib.wsrs.JSONProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<org.json.simple.JSONStreamAware>

@Provider
@InterfaceAudience.Private
public class JSONProvider
extends Object
implements javax.ws.rs.ext.MessageBodyWriter<org.json.simple.JSONStreamAware>


Constructor Summary
JSONProvider()
           
 
Method Summary
 long getSize(org.json.simple.JSONStreamAware jsonStreamAware, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 void writeTo(org.json.simple.JSONStreamAware jsonStreamAware, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> stringObjectMultivaluedMap, OutputStream outputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONProvider

public JSONProvider()
Method Detail

isWriteable

public boolean isWriteable(Class<?> aClass,
                           Type type,
                           Annotation[] annotations,
                           javax.ws.rs.core.MediaType mediaType)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<org.json.simple.JSONStreamAware>

getSize

public long getSize(org.json.simple.JSONStreamAware jsonStreamAware,
                    Class<?> aClass,
                    Type type,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<org.json.simple.JSONStreamAware>

writeTo

public void writeTo(org.json.simple.JSONStreamAware jsonStreamAware,
                    Class<?> aClass,
                    Type type,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType,
                    javax.ws.rs.core.MultivaluedMap<String,Object> stringObjectMultivaluedMap,
                    OutputStream outputStream)
             throws IOException,
                    javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<org.json.simple.JSONStreamAware>
Throws:
IOException
javax.ws.rs.WebApplicationException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.