com.restfully.shop.services
Class JavaMarshaller

java.lang.Object
  extended by com.restfully.shop.services.JavaMarshaller
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader, javax.ws.rs.ext.MessageBodyWriter

@Provider
public class JavaMarshaller
extends java.lang.Object
implements javax.ws.rs.ext.MessageBodyReader, javax.ws.rs.ext.MessageBodyWriter

Version:
$Revision: 1 $
Author:
Bill Burke

Constructor Summary
JavaMarshaller()
           
 
Method Summary
 long getSize(java.lang.Object o, java.lang.Class type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isReadable(java.lang.Class type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(java.lang.Class type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 java.lang.Object readFrom(java.lang.Class type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap httpHeaders, java.io.InputStream is)
           
 void writeTo(java.lang.Object o, java.lang.Class type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap httpHeaders, java.io.OutputStream os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaMarshaller

public JavaMarshaller()
Method Detail

isReadable

public boolean isReadable(java.lang.Class type,
                          java.lang.reflect.Type genericType,
                          java.lang.annotation.Annotation[] annotations,
                          javax.ws.rs.core.MediaType mediaType)
Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader

readFrom

public java.lang.Object readFrom(java.lang.Class type,
                                 java.lang.reflect.Type genericType,
                                 java.lang.annotation.Annotation[] annotations,
                                 javax.ws.rs.core.MediaType mediaType,
                                 javax.ws.rs.core.MultivaluedMap httpHeaders,
                                 java.io.InputStream is)
                          throws java.io.IOException,
                                 javax.ws.rs.WebApplicationException
Specified by:
readFrom in interface javax.ws.rs.ext.MessageBodyReader
Throws:
java.io.IOException
javax.ws.rs.WebApplicationException

isWriteable

public boolean isWriteable(java.lang.Class type,
                           java.lang.reflect.Type genericType,
                           java.lang.annotation.Annotation[] annotations,
                           javax.ws.rs.core.MediaType mediaType)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter

getSize

public long getSize(java.lang.Object o,
                    java.lang.Class type,
                    java.lang.reflect.Type genericType,
                    java.lang.annotation.Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter

writeTo

public void writeTo(java.lang.Object o,
                    java.lang.Class type,
                    java.lang.reflect.Type genericType,
                    java.lang.annotation.Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType,
                    javax.ws.rs.core.MultivaluedMap httpHeaders,
                    java.io.OutputStream os)
             throws java.io.IOException,
                    javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter
Throws:
java.io.IOException
javax.ws.rs.WebApplicationException


Copyright © 2011 Sun Microsystems, Inc. All Rights Reserved.