Building Asynchronous RESTful Services With Jersey
In this course, we explore writing asynchronous services, as well as many other features found in Jersey. We also cover dependency injection, exception mapping, filters, Grizzly, Jackson, JerseyTest, and more.
What you'll learn
At the start of the course we establish a basic "Books" API -- an API that we continually improve and build upon throughout the course. We begin by deploying to Grizzly, and then implement a series of tests with JerseyTest. These tests are also continually expanded throughout the course. We explore Jersey's built-in dependency injection, and improve our API to take advantage of Jersey's async support. We switch from the built-in MOXy library in favor of Jackson to render our highly-tailored JSON and XML, and build a custom MessageBodyWriter along the way. We explore mapping exceptions to responses, and supporting conditional GET requests. We implement our own PATCH verb, and along with it, support for conditional updates as well. Finally we explore Jersey's support for filters and implement our own custom filter.
Table of contents
- Switching from MOXy to Jackson (with Demo) 5m
- Jackson Features and Annotations 4m
- Demo: Fine-tuning Our JSON 4m
- Demo: Using Annotations for a More Flexible Resource 5m
- Making Our Tests Better 2m
- Demo: Removing the Server-side Code From Our Tests 7m
- Adding XML Support, Prioritizing JSON (with Demo) 7m
- Refining Our XML with Annotations (with Demo) 4m
- Wrapping Root Collections and Custom MessageBodyWriters 4m
- Demo: Creating a Custom MessageBodyWriter 6m
- Demo: Adding an XML Test with XPath 3m