class SourceProvider extends AbstractConfigurableProvider implements
    MessageBodyReader<T>, MessageBodyWriter<T> {

    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
        return Source.class.isAssignableFrom(type)
               || XMLSource.class.isAssignableFrom(type)
               || Document.class.isAssignableFrom(type);
    }

}