Class MessageUnmarshaller<T>

java.lang.Object
org.apache.hadoop.ozone.s3.endpoint.MessageUnmarshaller<T>
Type Parameters:
T - the object type to read from XML
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<T>
Direct Known Subclasses:
CompleteMultipartUploadRequestUnmarshaller, MultiDeleteRequestUnmarshaller, PutBucketAclRequestUnmarshaller, PutTaggingUnmarshaller

public class MessageUnmarshaller<T> extends Object implements javax.ws.rs.ext.MessageBodyReader<T>
Unmarshaller to create instances of type T from XML, which may or may not have namespace.
  • Constructor Details

    • MessageUnmarshaller

      public MessageUnmarshaller(Class<T> cls)
  • Method Details

    • isReadable

      public boolean isReadable(Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Specified by:
      isReadable in interface javax.ws.rs.ext.MessageBodyReader<T>
    • readFrom

      public T readFrom(Class<T> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> multivaluedMap, InputStream inputStream) throws javax.ws.rs.WebApplicationException
      Specified by:
      readFrom in interface javax.ws.rs.ext.MessageBodyReader<T>
      Throws:
      javax.ws.rs.WebApplicationException
    • readFrom

      public T readFrom(InputStream inputStream) throws javax.ws.rs.WebApplicationException
      Convenience method for programmatic invocation.
      Throws:
      javax.ws.rs.WebApplicationException