13.4. RESTEasy Defined Annotations


Table 13.1. JAX-RS/RESTEasy Annotations
Annotation Usage
ClientResponseType This is an annotation that you can add to a RESTEasy client interface that has a return type of Response.
ContentEncoding Meta annotation that specifies a Content-Encoding to be applied via the annotated annotation.
DecorateTypes Must be placed on a DecoratorProcessor class to specify the supported types.
Decorator Meta-annotation to be placed on another annotation that triggers decoration.
Form This can be used as a value object for incoming/outgoing request/responses.
StringParameterUnmarshallerBinder Meta-annotation to be placed on another annotation that triggers a StringParameterUnmarshaller to be applied to a string based annotation injector.
Cache Set response Cache-Control header automatically.
NoCache Set Cache-Control response header of "nocache".
ServerCached Specifies that the response to this jax-rs method should be cached on the server.
ClientInterceptor Identifies an interceptor as a client-side interceptor.
DecoderPrecedence This interceptor is an Content-Encoding decoder.
EncoderPrecedence This interceptor is an Content-Encoding encoder.
HeaderDecoratorPrecedence HeaderDecoratorPrecedence interceptors should always come first as they decorate a response (on the server), or an outgoing request (on the client) with special, user-defined, headers.
RedirectPrecedence Should be placed on a PreProcessInterceptor.
SecurityPrecedence Should be placed on a PreProcessInterceptor.
ServerInterceptor Identifies an interceptor as a server-side interceptor.
NoJackson Placed on class, parameter, field or method when you don't want the Jackson provider to be triggered.
ImageWriterParams An annotation that a resource class can use to pass parameters to the IIOImageProvider.
DoNotUseJAXBProvider Put this on a class or parameter when you do not want the JAXB MessageBodyReader/Writer used but instead have a more specific provider you want to use to marshall the type.
Formatted Format XML output with indentations and newlines. This is a JAXB Decorator.
IgnoreMediaTypes Placed on a type, method, parameter, or field to tell JAXRS not to use JAXB provider for a certain media type
Stylesheet Specifies an XML stylesheet header.
Wrapped Put this on a method or parameter when you want to marshal or unmarshal a collection or array of JAXB objects.
WrappedMap Put this on a method or parameter when you want to marshal or unmarshal a map of JAXB objects.
XmlHeader Sets an XML header for the returned document.
BadgerFish A JSONConfig.
Mapped A JSONConfig.
XmlNsMap A JSONToXml.
MultipartForm This can be used as a value object for incoming/outgoing request/responses of the multipart/form-data mime type.
PartType Must be used in conjunction with Multipart providers when writing out a List or Map as a multipart/* type.
XopWithMultipartRelated This annotation can be used to process/produce incoming/outgoing XOP messages (packaged as multipart/related) to/from JAXB annotated objects.
After Used to add an expiration attribute when signing or as a stale check for verification.
Signed Convenience annotation that triggers the signing of a request or response using the DOSETA specification.
Verify Verification of input signature specified in a signature header.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.