RESTfu­­l Jav­a­ wit­h ­JAX­-­­RS 2.­0­ (Second Edition)

Chapter 26. Examples for Chapter 12

In Chapter 12, you learned how filters and interceptors can be used to augment your JAX-RS service classes. In this chapter, we through how to build and run some of the examples shown in that chapter. Specifically, we’ll go write a ContainerResponseFilter, a DynamicFeature, and an implementation of a WriterInterceptor. If you want to see examples of a ClientRequestFilter and a ContainerRequestFilter bound via a @NameBinding, check out Chapter 29.