Developing RESTful Services with JAX-RS 2.0, WebSockets, and JSON.
Written as an easy and practical guide, this book is a crash course on using JAX-RS 2.0, JSON, and WebSockets to develop RESTful services. Getting Started with Developing RESTful Web Services using JAX-RS 2.0, JSON, and WebSockets is a perfect reading source for application developers who are famili...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Otros Autores: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing,
2013.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Copyright; Credits; About the Authors; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Building RESTful Web Services Using JAX-RS; Understanding REST; RESTful Web Services; Verbs in REST; Safety and idempotence; Introduction to JAX-RS; Converting POJOs to RESTful resources; Defining a root resource as identified by a URI; Defining the methods for the resource; Defining the MIME types; Defining the Application subclass; Defining the subresources; More on JAX-RS annotations; The Client API for JAX-RS; Entities in JAX-RS; Custom entity providers in JAX-RS.
- MessageBodyReaderMessageBodyWriter; Using the Bean Validation API with JAX-RS; Enabling validation in the application; Reading validation errors from the response; Summary; Chapter 2: WebSockets and Server-sent Events; The programming models; Polling; Long polling; Chunked transfer encoding; Emerging standards; Server-sent Events; The SSE anatomy; Associating an ID with an event; Connection loss and reconnecting retries; Associating event names with events; Server-sent Events and JavaScript; WebSockets; Web socket handshake; Browser and JavaScript support for WebSockets.
- Java EE and the emerging standardsJava EE and Server-sent Events; Java EE and WebSockets; Comparison and use cases of different programming models and standards; Summary; Chapter 3: Understanding WebSockets and Server-sent Events in Detail; Encoders and decoders in Java API for WebSockets; The Java WebSocket Client API; Sending different kinds of message data: blob/binary; Security and WebSockets; Best practices for WebSockets based applications; Throttling the rate of sending data; Controlling the maximum size of the message; Working with proxy servers and WebSockets; Server-sent Events.
- Developing a Server-sent Event client using Jersey APIBest practices for applications based on Server-sent Events; Checking if the event source's origin is as expected; Working with proxy servers and Server-sent Events; Handling fault tolerance for Server-sent Events; Summary; Chapter 4: JSON and Asynchronous Processing; Producing and parsing JSON documents; An overview of JSON API; Manipulating JSON documents using the event-based API; Producing JSON documents; Parsing JSON documents; Manipulating JSON documents using the JSON object model; Generating JSON documents; Parsing JSON documents.
- When to use the streaming versus the object APIIntroducing Servlet 3.1; NIO API and Servlet 3.1; Introducing ReadListener and WriteListener; Changes in the Servlet API interfaces; More changes in Servlet 3.1; New features in JAX-RS 2.0; Asynchronous request and response processing; Filters and interceptors; Asynchronous processing in EJB 3.1 and 3.2; Developing an asynchronous session bean; Developing a client servlet for the async session bean; Summary; Chapter 5: RESTful Web Services by Example; Event notification application; The project's layout; The event notification GUI.