@Override @SuppressWarnings("unchecked") public MediaType getMessageBodyWriterMediaType( final Class<?> c, final Type t, final Annotation[] as, final List<MediaType> acceptableMediaTypes) { for (final MediaType acceptable : acceptableMediaTypes) { for (final WriterModel model : writers) { for (final MediaType mt : model.declaredTypes()) { if (mt.isCompatible(acceptable) && model.isWriteable(c, t, as, acceptable)) { return MediaTypes.mostSpecific(mt, acceptable); } } } } return null; }
@Override @SuppressWarnings("unchecked") public MediaType getMessageBodyWriterMediaType( final Class<?> c, final Type t, final Annotation[] as, final List<MediaType> acceptableMediaTypes) { for (final MediaType acceptable : acceptableMediaTypes) { for (final WriterModel model : writers) { for (final MediaType mt : model.declaredTypes()) { if (mt.isCompatible(acceptable) && model.isWriteable(c, t, as, acceptable)) { return MediaTypes.mostSpecific(mt, acceptable); } } } } return null; }
MediaTypes.mostSpecific(methodProducesType, writerProduces), false);
MediaTypes.mostSpecific(methodProducesType, writerProduces), false);
/** * Create combined client/server media type. * * if the two types are not compatible, {@link #NO_MATCH} is returned. * * @param clientType client-side media type. * @param serverType server-side media type. * @return combined client/server media type. */ static CombinedMediaType create(MediaType clientType, EffectiveMediaType serverType) { if (!clientType.isCompatible(serverType.getMediaType())) { return NO_MATCH; } final MediaType strippedClientType = MediaTypes.stripQualityParams(clientType); final MediaType strippedServerType = MediaTypes.stripQualityParams(serverType.getMediaType()); return new CombinedMediaType( MediaTypes.mostSpecific(strippedClientType, strippedServerType), MediaTypes.getQuality(clientType), QualitySourceMediaType.getQualitySource(serverType.getMediaType()), matchedWildcards(clientType, serverType)); }
/** * Create combined client/server media type. * * if the two types are not compatible, {@link #NO_MATCH} is returned. * * @param clientType client-side media type. * @param serverType server-side media type. * @return combined client/server media type. */ static CombinedMediaType create(MediaType clientType, EffectiveMediaType serverType) { if (!clientType.isCompatible(serverType.getMediaType())) { return NO_MATCH; } final MediaType strippedClientType = MediaTypes.stripQualityParams(clientType); final MediaType strippedServerType = MediaTypes.stripQualityParams(serverType.getMediaType()); return new CombinedMediaType( MediaTypes.mostSpecific(strippedClientType, strippedServerType), MediaTypes.getQuality(clientType), QualitySourceMediaType.getQualitySource(serverType.getMediaType()), matchedWildcards(clientType, serverType)); }
MediaTypes.mostSpecific(methodProducesType, writerProduces), false);
/** * Create combined client/server media type. * * if the two types are not compatible, {@link #NO_MATCH} is returned. * * @param clientType client-side media type. * @param serverType server-side media type. * @return combined client/server media type. */ static CombinedMediaType create(MediaType clientType, EffectiveMediaType serverType) { if (!clientType.isCompatible(serverType.getMediaType())) { return NO_MATCH; } final MediaType strippedClientType = MediaTypes.stripQualityParams(clientType); final MediaType strippedServerType = MediaTypes.stripQualityParams(serverType.getMediaType()); return new CombinedMediaType( MediaTypes.mostSpecific(strippedClientType, strippedServerType), MediaTypes.getQuality(clientType), QualitySourceMediaType.getQualitySource(serverType.getMediaType()), matchedWildcards(clientType, serverType)); }
@Override @SuppressWarnings("unchecked") public MediaType getMessageBodyWriterMediaType( final Class<?> c, final Type t, final Annotation[] as, final List<MediaType> acceptableMediaTypes) { for (final MediaType acceptable : acceptableMediaTypes) { for (final WriterModel model : writers) { for (final MediaType mt : model.declaredTypes()) { if (mt.isCompatible(acceptable) && model.isWriteable(c, t, as, acceptable)) { return MediaTypes.mostSpecific(mt, acceptable); } } } } return null; }
@Override @SuppressWarnings("unchecked") public MediaType getMessageBodyWriterMediaType( final Class<?> c, final Type t, final Annotation[] as, final List<MediaType> acceptableMediaTypes) { for (final MediaType acceptable : acceptableMediaTypes) { for (final WriterModel model : writers) { for (final MediaType mt : model.declaredTypes()) { if (mt.isCompatible(acceptable) && model.isWriteable(c, t, as, acceptable)) { return MediaTypes.mostSpecific(mt, acceptable); } } } } return null; }
@Override @SuppressWarnings("unchecked") public MediaType getMessageBodyWriterMediaType( final Class<?> c, final Type t, final Annotation[] as, final List<MediaType> acceptableMediaTypes) { for (final MediaType acceptable : acceptableMediaTypes) { for (final WriterModel model : writers) { for (final MediaType mt : model.declaredTypes()) { if (mt.isCompatible(acceptable) && model.isWriteable(c, t, as, acceptable)) { return MediaTypes.mostSpecific(mt, acceptable); } } } } return null; }
@Override @SuppressWarnings("unchecked") public MediaType getMessageBodyWriterMediaType( final Class<?> c, final Type t, final Annotation[] as, final List<MediaType> acceptableMediaTypes) { for (final MediaType acceptable : acceptableMediaTypes) { for (final WriterModel model : writers) { for (final MediaType mt : model.declaredTypes()) { if (mt.isCompatible(acceptable) && model.isWriteable(c, t, as, acceptable)) { return MediaTypes.mostSpecific(mt, acceptable); } } } } return null; }
@Override @SuppressWarnings("unchecked") public MediaType getMessageBodyWriterMediaType( final Class<?> c, final Type t, final Annotation[] as, final List<MediaType> acceptableMediaTypes) { for (final MediaType acceptable : acceptableMediaTypes) { for (final WriterModel model : writers) { for (final MediaType mt : model.declaredTypes()) { if (mt.isCompatible(acceptable) && model.isWriteable(c, t, as, acceptable)) { return MediaTypes.mostSpecific(mt, acceptable); } } } } return null; }
MediaTypes.mostSpecific(methodProducesType, writerProduces), false);
MediaTypes.mostSpecific(methodProducesType, writerProduces), false);
/** * Create combined client/server media type. * * if the two types are not compatible, {@link #NO_MATCH} is returned. * * @param clientType client-side media type. * @param serverType server-side media type. * @return combined client/server media type. */ static CombinedMediaType create(MediaType clientType, EffectiveMediaType serverType) { if (!clientType.isCompatible(serverType.getMediaType())) { return NO_MATCH; } final MediaType strippedClientType = MediaTypes.stripQualityParams(clientType); final MediaType strippedServerType = MediaTypes.stripQualityParams(serverType.getMediaType()); return new CombinedMediaType( MediaTypes.mostSpecific(strippedClientType, strippedServerType), MediaTypes.getQuality(clientType), QualitySourceMediaType.getQualitySource(serverType.getMediaType()), matchedWildcards(clientType, serverType)); }
MediaTypes.mostSpecific(methodProducesType, writerProduces), false);
/** * Create combined client/server media type. * * if the two types are not compatible, {@link #NO_MATCH} is returned. * * @param clientType client-side media type. * @param serverType server-side media type. * @return combined client/server media type. */ static CombinedMediaType create(MediaType clientType, EffectiveMediaType serverType) { if (!clientType.isCompatible(serverType.getMediaType())) { return NO_MATCH; } final MediaType strippedClientType = MediaTypes.stripQualityParams(clientType); final MediaType strippedServerType = MediaTypes.stripQualityParams(serverType.getMediaType()); return new CombinedMediaType( MediaTypes.mostSpecific(strippedClientType, strippedServerType), MediaTypes.getQuality(clientType), QualitySourceMediaType.getQualitySource(serverType.getMediaType()), matchedWildcards(clientType, serverType)); }
/** * Create combined client/server media type. * * if the two types are not compatible, {@link #NO_MATCH} is returned. * * @param clientType client-side media type. * @param serverType server-side media type. * @return combined client/server media type. */ static CombinedMediaType create(MediaType clientType, EffectiveMediaType serverType) { if (!clientType.isCompatible(serverType.getMediaType())) { return NO_MATCH; } final MediaType strippedClientType = MediaTypes.stripQualityParams(clientType); final MediaType strippedServerType = MediaTypes.stripQualityParams(serverType.getMediaType()); return new CombinedMediaType( MediaTypes.mostSpecific(strippedClientType, strippedServerType), MediaTypes.getQuality(clientType), QualitySourceMediaType.getQualitySource(serverType.getMediaType()), matchedWildcards(clientType, serverType)); }
/** * Create combined client/server media type. * * if the two types are not compatible, {@link #NO_MATCH} is returned. * * @param clientType client-side media type. * @param serverType server-side media type. * @return combined client/server media type. */ static CombinedMediaType create(MediaType clientType, EffectiveMediaType serverType) { if (!clientType.isCompatible(serverType.getMediaType())) { return NO_MATCH; } final MediaType strippedClientType = MediaTypes.stripQualityParams(clientType); final MediaType strippedServerType = MediaTypes.stripQualityParams(serverType.getMediaType()); return new CombinedMediaType( MediaTypes.mostSpecific(strippedClientType, strippedServerType), MediaTypes.getQuality(clientType), QualitySourceMediaType.getQualitySource(serverType.getMediaType()), matchedWildcards(clientType, serverType)); }