Apache CXF API

org.apache.cxf.rs.security.oauth2.provider
Class OAuthJSONProvider

java.lang.Object
  extended by org.apache.cxf.rs.security.oauth2.provider.OAuthJSONProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>

@Provider
public class OAuthJSONProvider
extends Object
implements javax.ws.rs.ext.MessageBodyWriter<Object>, javax.ws.rs.ext.MessageBodyReader<Object>


Constructor Summary
OAuthJSONProvider()
           
 
Method Summary
 long getSize(Object obj, Class<?> clt, Type t, Annotation[] anns, javax.ws.rs.core.MediaType mt)
           
 boolean isReadable(Class<?> cls, Type t, Annotation[] anns, javax.ws.rs.core.MediaType mt)
           
 boolean isWriteable(Class<?> cls, Type t, Annotation[] anns, javax.ws.rs.core.MediaType mt)
           
 Object readFrom(Class<Object> cls, Type t, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is)
           
 Map<String,String> readJSONResponse(InputStream is)
           
 void writeTo(Object obj, Class<?> cls, Type t, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthJSONProvider

public OAuthJSONProvider()
Method Detail

getSize

public long getSize(Object obj,
                    Class<?> clt,
                    Type t,
                    Annotation[] anns,
                    javax.ws.rs.core.MediaType mt)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<Object>

isWriteable

public boolean isWriteable(Class<?> cls,
                           Type t,
                           Annotation[] anns,
                           javax.ws.rs.core.MediaType mt)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<Object>

writeTo

public void writeTo(Object obj,
                    Class<?> cls,
                    Type t,
                    Annotation[] anns,
                    javax.ws.rs.core.MediaType mt,
                    javax.ws.rs.core.MultivaluedMap<String,Object> headers,
                    OutputStream os)
             throws IOException,
                    javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Object>
Throws:
IOException
javax.ws.rs.WebApplicationException

isReadable

public boolean isReadable(Class<?> cls,
                          Type t,
                          Annotation[] anns,
                          javax.ws.rs.core.MediaType mt)
Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader<Object>

readFrom

public Object readFrom(Class<Object> cls,
                       Type t,
                       Annotation[] anns,
                       javax.ws.rs.core.MediaType mt,
                       javax.ws.rs.core.MultivaluedMap<String,String> headers,
                       InputStream is)
                throws IOException,
                       javax.ws.rs.WebApplicationException
Specified by:
readFrom in interface javax.ws.rs.ext.MessageBodyReader<Object>
Throws:
IOException
javax.ws.rs.WebApplicationException

readJSONResponse

public Map<String,String> readJSONResponse(InputStream is)
                                    throws IOException
Throws:
IOException

Apache CXF API

Apache CXF