RESTful Java with JAX-RS 2.0 - Bill Burke

RESTful Java with JAX-RS 2.0

Designing and Developing Distributed Web Services

(Autor)

Buch | Softcover
392 Seiten
2013 | 2nd Revised edition
O'Reilly Media (Verlag)
978-1-4493-6134-1 (ISBN)
35,90 inkl. MwSt
Learn how to design and develop distributed web services in Java, using RESTful architectural principles and the JAX-RS 2.0 specification in Java EE 7. By focusing on implementation rather than theory, this hands-on reference demonstrates how easy it is to get started with services based on the REST architecture.

With the book’s technical guide, you’ll learn how REST and JAX-RS work and when to use them. The RESTEasy workbook that follows provides step-by-step instructions for installing, configuring, and running several working JAX-RS examples, using the JBoss RESTEasy implementation of JAX-RS 2.0.
  • Learn JAX-RS 2.0 features, including a client API, server-side asynchronous HTTP, and filters and interceptors
  • Examine the design of a distributed RESTful interface for an e-commerce order entry system
  • Use the JAX-RS Response object to return complex responses to your client (ResponseBuilder)
  • Increase the performance of your services by leveraging HTTP caching protocols
  • Deploy and integrate web services within Java EE7, servlet containers, EJB, Spring, and JPA
  • Learn popular mechanisms to perform authentication on the Web, including client-side SSL and OAuth 2.0

Bill Burke is a Fellow at the JBoss division of REd Hat Inc. A long time JBoss contributor and architect, his current project is RESTEasy, RESTful Web Services for Java.

REST and the JAX-RS Standard
Chapter 1 Introduction to REST
REST and the Rebirth of HTTP
RESTful Architectural Principles
Wrapping Up
Chapter 2 Designing RESTful Services
The Object Model
Model the URIs
Defining the Data Format
Assigning HTTP Methods
Wrapping Up
Chapter 3 Your First JAX-RS Service
Developing a JAX-RS RESTful Service
Deploying Our Service
Writing a Client
Wrapping Up
Chapter 4 HTTP Method and URI Matching
Binding HTTP Methods
@Path
Subresource Locators
Gotchas in Request Matching
Wrapping Up
Chapter 5 JAX-RS Injection
The Basics
@PathParam
@MatrixParam
@QueryParam
@FormParam
@HeaderParam
@CookieParam
@BeanParam
Common Functionality
Wrapping Up
Chapter 6 JAX-RS Content Handlers
Built-in Content Marshalling
JAXB
Custom Marshalling
Wrapping Up
Chapter 7 Server Responses and Exception Handling
Default Response Codes
Complex Responses
Exception Handling
Wrapping Up
Chapter 8 JAX-RS Client API
Client Introduction
Bootstrapping with ClientBuilder
Client and WebTarget
Building and Invoking Requests
Configuration Scopes
Wrapping Up
Chapter 9 HTTP Content Negotiation
Conneg Explained
Language Negotiation
Encoding Negotiation
JAX-RS and Conneg
Leveraging Content Negotiation
Wrapping Up
Chapter 10 HATEOAS
HATEOAS and Web Services
HATEOAS and JAX-RS
Building Links and Link Headers
Wrapping Up
Chapter 11 Scaling JAX-RS Applications
Caching
Concurrency
Wrapping Up
Chapter 12 Filters and Interceptors
Server-Side Filters
Reader and Writer Interceptors
Client-Side Filters
Deploying Filters and Interceptors
Ordering Filters and Interceptors
Per-JAX-RS Method Bindings
Exception Processing
Wrapping Up
Chapter 13 Asynchronous JAX-RS
AsyncInvoker Client API
Server Asynchronous Response Processing
Wrapping Up
Chapter 14 Deployment and Integration
Deployment
Configuration
EJB Integration
Spring Integration
Wrapping Up
Chapter 15 Securing JAX-RS
Authentication
Authorization
Authentication and Authorization in JAX-RS
Programmatic Security
Client Security
OAuth 2.0
Signing and Encrypting Message Bodies
Wrapping Up
Chapter 16 Alternative Java Clients
java.net.URL
Apache HttpClient
RESTEasy Client Proxies
Wrapping Up
JAX-RS Workbook
Chapter 17 Workbook Introduction
Installing RESTEasy and the Examples
Example Requirements and Structure
Chapter 18 Examples for Chapter 3
Build and Run the Example Program
Examining the Source Code
Chapter 19 Examples for Chapter 4
Example ex04_1: HTTP Method Extension
Example ex04_2: @Path with Expressions
Example ex04_3: Subresource Locators
Chapter 20 Examples for Chapter 5
Example ex05_1: Injecting URI Information
Example ex05_2: Forms and Cookies
Chapter 21 Examples for Chapter 6
Example ex06_1: Using JAXB
Example ex06_2: Creating a Content Handler
Chapter 22 Examples for Chapter 7
Example ex07_1: ExceptionMapper
Chapter 23 Examples for Chapter 9
Example ex09_1: Conneg with JAX-RS
Example ex09_2: Conneg via URL Patterns
Chapter 24 Examples for Chapter 10
Example ex10_1: Atom Links
Example ex10_2: Link Headers
Chapter 25 Examples for Chapter 11
Example ex11_1: Caching and Concurrent Updates
Chapter 26 Examples for Chapter 12
Example ex12_1 : ContainerResponseFilter and DynamicFeature
Example ex12_2: Implementing a WriterInterceptor
Chapter 27 Examples for Chapter 13
Example ex13_1: Chat REST Interface
Chapter 28 Examples for Chapter 14
Example ex14_1: EJB and JAX-RS
Example ex14_2: Spring and JAX-RS
Chapter 29 Examples for Chapter 15
Example ex15_1: Custom Security
Example ex15_1: JSON Web Encryption
Index
Colophon

Erscheint lt. Verlag 31.12.2013
Verlagsort Sebastopol
Sprache englisch
Maße 178 x 233 mm
Gewicht 635 g
Einbandart kartoniert
Themenwelt Informatik Programmiersprachen / -werkzeuge Java
Informatik Software Entwicklung Objektorientierung
Informatik Software Entwicklung SOA / Web Services
ISBN-10 1-4493-6134-X / 144936134X
ISBN-13 978-1-4493-6134-1 / 9781449361341
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
mit über 150 Workouts in Java und Python

von Luigi Lo Iacono; Stephan Wiefling; Michael Schneider

Buch (2023)
Carl Hanser (Verlag)
29,99
Einführung, Ausbildung, Praxis

von Christian Ullenboom

Buch | Hardcover (2023)
Rheinwerk (Verlag)
49,90