Uses of Class
jakarta.ws.rs.core.MediaType
-
Packages that use MediaType Package Description jakarta.ws.rs.client The JAX-RS client APIjakarta.ws.rs.container Container-specific JAX-RS API.jakarta.ws.rs.core Low-level interfaces and annotations used to create RESTful service resources.jakarta.ws.rs.ext APIs that provide extensions to the types supported by the JAX-RS API.jakarta.ws.rs.sse Server-Sent Events related API. -
-
Uses of MediaType in jakarta.ws.rs.client
Methods in jakarta.ws.rs.client that return MediaType Modifier and Type Method Description MediaTypeClientRequestContext. getMediaType()Get the media type of the entity.MediaTypeClientResponseContext. getMediaType()Get the media type of the entity.MediaTypeEntity. getMediaType()Get entity media type.Methods in jakarta.ws.rs.client that return types with arguments of type MediaType Modifier and Type Method Description List<MediaType>ClientRequestContext. getAcceptableMediaTypes()Get a list of media types that are acceptable for the response.Methods in jakarta.ws.rs.client with parameters of type MediaType Modifier and Type Method Description Invocation.BuilderInvocation.Builder. accept(MediaType... mediaTypes)Add the accepted response media types.static <T> Entity<T>Entity. entity(T entity, MediaType mediaType)Create an entity using a supplied content media type.static <T> Entity<T>Entity. entity(T entity, MediaType mediaType, Annotation[] annotations)Create an entity using a supplied content media type.Invocation.BuilderWebTarget. request(MediaType... acceptedResponseTypes)Start building a request to the targeted web resource and define the accepted response media types.voidClientRequestContext. setEntity(Object entity, Annotation[] annotations, MediaType mediaType)Set a new message entity, including the attached annotations and the media type. -
Uses of MediaType in jakarta.ws.rs.container
Methods in jakarta.ws.rs.container that return MediaType Modifier and Type Method Description MediaTypeContainerRequestContext. getMediaType()Get the media type of the entity.MediaTypeContainerResponseContext. getMediaType()Get the media type of the entity.Methods in jakarta.ws.rs.container that return types with arguments of type MediaType Modifier and Type Method Description List<MediaType>ContainerRequestContext. getAcceptableMediaTypes()Get a list of media types that are acceptable for the response.Methods in jakarta.ws.rs.container with parameters of type MediaType Modifier and Type Method Description voidContainerResponseContext. setEntity(Object entity, Annotation[] annotations, MediaType mediaType)Set a new message entity, including the attached annotations and the media type. -
Uses of MediaType in jakarta.ws.rs.core
Methods in jakarta.ws.rs.core that return MediaType Modifier and Type Method Description MediaTypeEntityPart. getMediaType()Returns the content type of this part, and equivalent to callingMediaType.valueOf(part.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).MediaTypeHttpHeaders. getMediaType()Get the media type of the request entity.abstract MediaTypeResponse. getMediaType()Get the media type of the message entity.MediaTypeVariant. getMediaType()Get the media type of the variant.static MediaTypeMediaType. valueOf(String type)Creates a new instance ofMediaTypeby parsing the supplied string.MediaTypeMediaType. withCharset(String charset)Create a newMediaTypeinstance with the same type, subtype and parameters copied from the original instance and the supplied "charset" parameter.Methods in jakarta.ws.rs.core that return types with arguments of type MediaType Modifier and Type Method Description List<MediaType>HttpHeaders. getAcceptableMediaTypes()Get a list of media types that are acceptable for the response.Methods in jakarta.ws.rs.core with parameters of type MediaType Modifier and Type Method Description booleanMediaType. isCompatible(MediaType other)Check if this media type is compatible with another media type.EntityPart.BuilderEntityPart.Builder. mediaType(MediaType mediaType)Sets the media type for the EntityPart.static Variant.VariantListBuilderVariant. mediaTypes(MediaType... mediaTypes)Create aVariant.VariantListBuilderinitialized with a set of supported media types.abstract Variant.VariantListBuilderVariant.VariantListBuilder. mediaTypes(MediaType... mediaTypes)Set the media type(s) for this variant.static Response.ResponseBuilderResponse. ok(Object entity, MediaType type)Create a new ResponseBuilder that contains a representation.abstract Response.ResponseBuilderResponse.ResponseBuilder. type(MediaType type)Set the message entity media type.Constructors in jakarta.ws.rs.core with parameters of type MediaType Constructor Description Variant(MediaType mediaType, String language, String encoding)Create a new instance of Variant.Variant(MediaType mediaType, String language, String country, String encoding)Create a new instance of Variant.Variant(MediaType mediaType, String language, String country, String languageVariant, String encoding)Create a new instance of Variant.Variant(MediaType mediaType, Locale language, String encoding)Create a new instance of Variant. -
Uses of MediaType in jakarta.ws.rs.ext
Methods in jakarta.ws.rs.ext that return MediaType Modifier and Type Method Description MediaTypeInterceptorContext. getMediaType()Get media type of HTTP entity.Methods in jakarta.ws.rs.ext with parameters of type MediaType Modifier and Type Method Description <T> ContextResolver<T>Providers. getContextResolver(Class<T> contextType, MediaType mediaType)Get a context resolver for a particular type of context and media type.<T> MessageBodyReader<T>Providers. getMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType)Get a message body reader that matches a set of criteria.<T> MessageBodyWriter<T>Providers. getMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType)Get a message body writer that matches a set of criteria.default longMessageBodyWriter. getSize(T t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)Originally, the method has been called beforewriteToto ascertain the length in bytes of the serialized form oft.booleanMessageBodyReader. isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)Ascertain if the MessageBodyReader can produce an instance of a particular type.booleanMessageBodyWriter. isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)Ascertain if the MessageBodyWriter supports a particular type.TMessageBodyReader. readFrom(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,String> httpHeaders, InputStream entityStream)Read a type from theInputStream.voidInterceptorContext. setMediaType(MediaType mediaType)Update media type of HTTP entity.voidMessageBodyWriter. writeTo(T t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)Write a type to an HTTP message. -
Uses of MediaType in jakarta.ws.rs.sse
Methods in jakarta.ws.rs.sse that return MediaType Modifier and Type Method Description MediaTypeOutboundSseEvent. getMediaType()Getmedia typeof the event data.Methods in jakarta.ws.rs.sse with parameters of type MediaType Modifier and Type Method Description OutboundSseEvent.BuilderOutboundSseEvent.Builder. mediaType(MediaType mediaType)Set themedia typeof the event data.<T> TInboundSseEvent. readData(GenericType<T> type, MediaType mediaType)Read event data as a given generic type.<T> TInboundSseEvent. readData(Class<T> messageType, MediaType mediaType)Read event data as a given Java type.
-