# Introduction

![](/files/-M3y26LTrmP_kd6EvKeX)

> ### Head over to [Leanpub](https://leanpub.com/java-websocket-api-handbook) to grab a PDF version of this book

The book is what it says it is - a handbook, a quick reference, a fast track guide. It covers the nitty gritty of the [**Java API for WebSocket**](https://jcp.org/en/jsr/detail?id=356): a Java based standard (specification) for building WebSocket based applications. As with most standard (Java) APIs, the WebSocket API has multiple (competing) implementations which comply with the specification. It is also a part of the [**Java EE Platform**](https://www.jcp.org/en/jsr/detail?id=342).

> What it implies is that you can use this standard API in a standalone format as well as part of a larger platform in concert with other Java EE based APIs such as JAX-RS, CDI, JPA, EJB, JMS etc.

## What's in the book ?

Let's look at a quick outline of book contents

The first three lessons are meant to get your **feet wet**

* [Warm up](https://github.com/abhirockzz/java-websocket-api-handbook/tree/d4615f44cb49e74da9f642c8b081e7ecd123ea12/Introduction.html)
* [API Overview](https://github.com/abhirockzz/java-websocket-api-handbook/tree/d4615f44cb49e74da9f642c8b081e7ecd123ea12/Exploring%20the%20API.html)
* [Programming Model](https://github.com/abhirockzz/java-websocket-api-handbook/tree/d4615f44cb49e74da9f642c8b081e7ecd123ea12/Programming%20Model.html)

Then comes the **core** part which is important from a API usage perspective

* [Sending Messages](https://github.com/abhirockzz/java-websocket-api-handbook/tree/d4615f44cb49e74da9f642c8b081e7ecd123ea12/Sending%20Messages.html)
* [Receiving Messages](https://github.com/abhirockzz/java-websocket-api-handbook/tree/d4615f44cb49e74da9f642c8b081e7ecd123ea12/Receiving%20Messages.html)
* [WebSocket Client API](https://github.com/abhirockzz/java-websocket-api-handbook/tree/d4615f44cb49e74da9f642c8b081e7ecd123ea12/websocket_client_api.html)

The default conventions offered by the WebSocket API can actually hide the details related to Configuration & Deployment, but you should know them anyway !

* [Configuration](https://github.com/abhirockzz/java-websocket-api-handbook/tree/d4615f44cb49e74da9f642c8b081e7ecd123ea12/configuration.html)
* [Deployment](https://github.com/abhirockzz/java-websocket-api-handbook/tree/d4615f44cb49e74da9f642c8b081e7ecd123ea12/deployment.html)

The book ends with a exploration of how the API integrates with other Java EE specifications as well as a quick peek into the threading details of some of the API constructs

* Tying in with the Java EE Platform: [Part I](https://github.com/abhirockzz/java-websocket-api-handbook/tree/d4615f44cb49e74da9f642c8b081e7ecd123ea12/part-1-tying_in_with_the_java_ee_platform.html) and [Part II](https://github.com/abhirockzz/java-websocket-api-handbook/tree/d4615f44cb49e74da9f642c8b081e7ecd123ea12/part-2-tying_in_with_the_java_ee_platform.html)
* [Lifecycle and Concurrency semantics](https://github.com/abhirockzz/java-websocket-api-handbook/tree/d4615f44cb49e74da9f642c8b081e7ecd123ea12/lifecycle_and_concurrency_semantics.html)

## Who is it suitable for ?

Although I would love for this book to be used by everyone, but, it is most suitable for Java/Java EE developers and can be used in various capacities

* As a 'getting started' with the Java WebSocket API guide
* You are well versed with the API and its constructs, but need a quick peek/reference to a specific API, it's usage, nuances etc.
* Maybe you're just curious about what Java has to offer in terms of WebSocket support - feel free to check this out

## What it is not ?

* a generic discourse on WebSocket: it deals with the Java implementation of the WebSocket specification (JSR-356 to be specific)
* a deep dive into the [WebSocket RFC](https://tools.ietf.org/html/rfc6455) itself
* exploration of other Java based WebSocket APIs/frameworks (e.g. Atmosphere etc.) is not the goal of this book


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://abhishek-gupta.gitbook.io/java-websocket-api-handbook/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
