public boolean isReadable(Class<?> type, Type gType, Annotation[] anns, MediaType mt) { if (delegatingReaders != null) { return getDelegatingReader(type, gType, anns, mt) != null; } return isProviderKeyNotSet(); }
public boolean isReadable(Class<?> type, Type gType, Annotation[] anns, MediaType mt) { if (delegatingReaders != null) { return getDelegatingReader(type, gType, anns, mt) != null; } else { return isProviderKeyNotSet(); } }
protected MessageBodyReader<T> getReader(Class<?> type, Type gType, Annotation[] anns, MediaType mt) { if (delegatingReaders != null) { return getDelegatingReader(type, gType, anns, mt); } MessageBodyReader<T> r = null; mc.put(ACTIVE_JAXRS_PROVIDER_KEY, this); try { @SuppressWarnings("unchecked") Class<T> actualType = (Class<T>)type; r = mc.getProviders().getMessageBodyReader(actualType, gType, anns, mt); } finally { mc.put(ACTIVE_JAXRS_PROVIDER_KEY, null); } if (r == null) { org.apache.cxf.common.i18n.Message message = new org.apache.cxf.common.i18n.Message("NO_MSG_READER", BUNDLE, type); LOG.severe(message.toString()); throw ExceptionUtils.toNotAcceptableException(null, null); } return r; }
protected MessageBodyReader<T> getReader(Class<?> type, Type gType, Annotation[] anns, MediaType mt) { if (delegatingReaders != null) { return getDelegatingReader(type, gType, anns, mt); } MessageBodyReader<T> r = null; mc.put(ACTIVE_JAXRS_PROVIDER_KEY, this); try { @SuppressWarnings("unchecked") Class<T> actualType = (Class<T>)type; r = mc.getProviders().getMessageBodyReader(actualType, gType, anns, mt); } finally { mc.put(ACTIVE_JAXRS_PROVIDER_KEY, null); } if (r == null) { org.apache.cxf.common.i18n.Message message = new org.apache.cxf.common.i18n.Message("NO_MSG_READER", BUNDLE, type); LOG.severe(message.toString()); throw ExceptionUtils.toNotAcceptableException(null, null); } return r; }