org.overlord.sramp.client
Class SrampClientExceptionReader
java.lang.Object
org.overlord.sramp.client.SrampClientExceptionReader
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyReader<SrampServerException>
@Provider
public class SrampClientExceptionReader
- extends Object
- implements javax.ws.rs.ext.MessageBodyReader<SrampServerException>
A RESTEasy message body reader that is capable of reading an exception from the
response body.
TODO merge this and SrampAtomExceptionMapper - don't need both
- Author:
- eric.wittmann@redhat.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SrampClientExceptionReader
public SrampClientExceptionReader()
- Constructor.
isReadable
public boolean isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
- Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader<SrampServerException>
- See Also:
MessageBodyReader.isReadable(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType)
readFrom
public SrampServerException readFrom(Class<SrampServerException> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream)
throws IOException,
javax.ws.rs.WebApplicationException
- Specified by:
readFrom in interface javax.ws.rs.ext.MessageBodyReader<SrampServerException>
- Throws:
IOException
javax.ws.rs.WebApplicationException- See Also:
MessageBodyReader.readFrom(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.InputStream)
Copyright © 2011-2012 JBoss, a division of Red Hat. All Rights Reserved.