Package org.opennms.web.rest.support
Class ValidatingMessageBodyReader<T>
- java.lang.Object
-
- org.opennms.web.rest.support.ValidatingMessageBodyReader<T>
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<T>
@Provider public class ValidatingMessageBodyReader<T> extends Object implements javax.ws.rs.ext.MessageBodyReader<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.ws.rs.ext.Providers
providers
-
Constructor Summary
Constructors Constructor Description ValidatingMessageBodyReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isReadable(Class<?> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
T
readFrom(Class<T> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> parameters, InputStream stream)
-
-
-
Method Detail
-
isReadable
public boolean isReadable(Class<?> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isReadable
in interfacejavax.ws.rs.ext.MessageBodyReader<T>
- Returns:
- true if the class is a JAXB-marshallable class that has
an
XmlRootElement
annotation.
-
readFrom
public T readFrom(Class<T> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> parameters, InputStream stream) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
readFrom
in interfacejavax.ws.rs.ext.MessageBodyReader<T>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
-