For CometD support, custom code development, clustering advices, scalability and performance tuning, contact the core CometD developers at www.webtide.com

The CometD Reference Book

CometD 2.8.0

12 February 2014


Table of Contents

Preface
1. CometD Commercial Support Services
2. Contributing to CometD
3. Installation
3.1. Running the Demos
3.1.1. Running the Demos with Maven
3.1.2. Running the Demos with Jetty or Another Servlet Container
4. Troubleshooting
4.1. Logging
4.1.1. Enabling Debug Logging in the JavaScript Library
4.1.2. Enabling Debug Logging in the Java Server Library
5. Primer
5.1. Setting Up the Project
5.1.1. The Maven Way
5.1.2. The Non-Maven Way
5.1.3. Setup Details
6. Concepts & Architecture
6.1. Definitions
6.1.1. Channel Definitions
6.2. The High Level View
6.3. The Lower Level View
6.3.1. Sessions
6.3.2. The Server
6.3.3. Listeners
6.3.4. Message Processing
6.3.5. Threading
6.3.6. Application Interaction
6.3.7. Bayeux Protocol
7. JavaScript Library
7.1. Configuring and Initializing
7.1.1. Configuring and Initializing Multiple Objects
7.2. Handshaking
7.3. Subscribing and Unsubscribing
7.3.1. Meta Channels
7.3.2. Service Channels
7.3.3. Broadcast Channels
7.3.4. Subscribers versus Listeners
7.3.5. Dynamic Resubscription
7.3.6. Listeners and Subscribers Exception Handling
7.3.7. Wildcard Subscriptions
7.3.8. Meta Channel List
7.4. Publishing
7.5. Disconnecting
7.5.1. Short Network Failures
7.5.2. Long Network Failures or Server Failures
7.6. Message Batching
7.7. JavaScript Transports
7.7.1. The long-polling Transport
7.7.2. The callback-polling Transport
7.7.3. The websocket Transport
7.7.4. Unregistering Transports
7.7.5. The cross-domain Mode
8. Java Libraries
8.1. Client Library
8.1.1. Handshaking
8.1.2. Subscribing and Unsubscribing
8.1.3. Publishing
8.1.4. Disconnecting
8.1.5. Client Transports
8.1.6. Client-side Annotations
8.2. Server Library
8.2.1. Configuring the Java Server
8.2.2. Using Services
8.2.3. Authorization
8.2.4. Server Channel Authorizers
8.2.5. Server Transports
8.2.6. Contextual Information
8.2.7. Lazy Channels and Messages
8.2.8. Multiple Sessions
8.2.9. JMX Integration
8.3. JSON Libraries
8.3.1. JSONContext API
8.3.2. Portability Considerations
8.3.3. Customizing Deserialization of JSON objects
8.4. Scalability Clustering with Oort
8.4.1. Typical Infrastructure
8.4.2. Terminology
8.4.3. Oort Cloud
8.4.4. Seti
8.4.5. Distributed Objects and Services
9. Extensions
9.1. Writing the Extension
9.2. Registering the Extension
9.3. Extension Exception Handling
9.4. Activity Extension
9.4.1. Enabling the Extension
9.4.2. Enabling the Extension Only for a Specific ServerSession
9.5. Message Acknowledgment Extension
9.5.1. Enabling the Server-side Message Acknowledgment Extension
9.5.2. Enabling the Client-side Message Acknowledgment Extension
9.5.3. Acknowledge Extension Details
9.5.4. Message Ordering
9.5.5. Demo
9.6. Reload Extension
9.6.1. Enabling the Client-side Extension
9.6.2. Configuring the Reload Extension
9.6.3. Understanding Reload Extension Details
9.7. Timestamp Extension
9.7.1. Enabling the Server-side Extension
9.7.2. Enabling the Client-side Extension
9.8. Timesync Extension
9.8.1. Enabling the Server-side Extension
9.8.2. Enabling the Client-side Extension
9.8.3. Understanding Timesync Extension Details
A. Building
B. Migrating from CometD 1
C. The Bayeux Protocol Specification v1.0
C.1. Introduction
C.2. Overall Operation
C.3. Protocol Elements
C.4. Common Message Field Definitions
C.5. Meta Message Field Definitions
C.5.1. Handshake
C.5.2. Connect
C.5.3. Disconnect
C.5.4. Subscribe
C.5.5. Unsubscribe
C.6. Event Message Field Definitions
C.6.1. Publish
C.6.2. Delivery
C.7. Transports
C.7.1. The long-polling Transport
C.7.2. The callback-polling Transport
C.8. Security
C.9. Multiple clients operation
C.10. Request / Response operation with service channels
D. Committer Release Instructions

List of Tables

7.1. JavaScript Library Configuration Parameters
8.1. Client Transports Common Parameters
8.2. Long Polling Client Transport Parameters
8.3. WebSocket Client Transport Parameters
8.4. BayeuxServer Configuration Parameters
8.5. Server Transports Common Configuration Parameters
8.6. Long Polling & Callback Polling Server Transports Configuration Parameters
8.7. WebSocket Server Transport Configuration Parameters
8.8. Oort Common Configuration Parameters
8.9. Oort Multicast Configuration Parameters
8.10. Oort Static Configuration Parameters
9.1. Reload Extension Configuration Parameters