public <T> MessageBodyReader<T> getMessageBodyReader( Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType) { return ProviderFactory.getInstance(m).createMessageBodyReader( type, genericType, annotations, mediaType, m); }
public <T> MessageBodyReader<T> getMessageBodyReader( Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType) { return ProviderFactory.getInstance(m).createMessageBodyReader( type, getGenericType(type, genericType), annotations, mediaType, m); }
return mr; return SHARED_FACTORY.createMessageBodyReader(bodyType, parameterType, parameterAnnotations,
MediaType mediaType, Message m) { MessageBodyReader<T> mr = createMessageBodyReader(bodyType, parameterType, parameterAnnotations,
boolean checkMbrNow, Set<String> names) { MessageBodyReader<T> mr = !checkMbrNow ? null : createMessageBodyReader(bodyType, parameterType, parameterAnnotations,
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public Object aroundReadFrom(ReaderInterceptorContext c) throws IOException, WebApplicationException { Class entityCls = (Class)c.getType(); Type entityType = c.getGenericType(); MediaType entityMt = c.getMediaType(); Annotation[] entityAnns = c.getAnnotations(); if (m.get(ProviderFactory.PROVIDER_SELECTION_PROPERTY_CHANGED) == Boolean.TRUE && !reader.isReadable(entityCls, entityType, entityAnns, entityMt)) { reader = ProviderFactory.getInstance(m) .createMessageBodyReader(entityCls, entityType, entityAnns, entityMt, m); if (reader == null) { throw new RuntimeException("No reader available"); } } return reader.readFrom(entityCls, entityType, entityAnns, entityMt, new HttpHeadersImpl(m).getRequestHeaders(), c.getInputStream()); }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public Object aroundReadFrom(ReaderInterceptorContext c) throws IOException, WebApplicationException { Class entityCls = c.getType(); Type entityType = c.getGenericType(); MediaType entityMt = c.getMediaType(); Annotation[] entityAnns = c.getAnnotations(); if ((reader == null || m.get(ProviderFactory.PROVIDER_SELECTION_PROPERTY_CHANGED) == Boolean.TRUE && !reader.isReadable(entityCls, entityType, entityAnns, entityMt)) && entityStreamAvailable(c.getInputStream())) { reader = ProviderFactory.getInstance(m) .createMessageBodyReader(entityCls, entityType, entityAnns, entityMt, m); } if (reader == null) { String errorMessage = JAXRSUtils.logMessageHandlerProblem("NO_MSG_READER", entityCls, entityMt); throw new ProcessingException(errorMessage); } return reader.readFrom(entityCls, entityType, entityAnns, entityMt, new HttpHeadersImpl(m).getRequestHeaders(), c.getInputStream()); }