MCPcopy Index your code
hub / github.com/cometd/cometd

github.com/cometd/cometd @9.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 9.0.1 ↗ · + Follow
5,956 symbols 27,781 edges 490 files 756 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

The CometD Project

Welcome to the CometD Project, a scalable comet (server push) implementation for the web.

CometD Versions

CometD Version Min Java Version Min Jetty Version Servlet APIs Status
9.0.x Java 17 Jetty 12.1.x EE11 jakarta.servlet.* Stable
8.0.x Java 17 Jetty 12.0.x EE10 jakarta.servlet.* Stable
7.0.x Java 11 Jetty 11.0.x EE9 jakarta.servlet.* End-Of-Community-Support
6.0.x Java 11 Jetty 10.0.x EE8 javax.servlet.* End-Of-Community-Support
5.0.x Java 8 Jetty 9.4.x EE7 javax.servlet.* End-Of-Community-Support

CometD License

The CometD source code is released under the Apache 2.0 License.

Project Directory Layout

cometd-archetypes    - The Maven archetypes for quick application development
cometd-demo          - Demo of the Java server and of the ES6/jQuery clients
cometd-documentation - The CometD documentation
cometd-java          - The Java server and java client libraries
cometd-javascript    - The JavaScript (ES6/jQuery) client libraries

Running the CometD Demo

If you have downloaded the release bundle, then the CometD is already built for you. To run the demonstration with Maven, unzip the release bundle and execute:

$ cd cometd-demo
$ mvn jetty:run

then point your browser at http://localhost:8080

Alternately you can deploy the CometD demo war file into any Servlet 2.5 or later server (e.g. jetty, tomcat, glassfish) with commands like:

$ cp cometd-demo/target/cometd-demo/target/cometd-demo-*.war  $MY_SERVER/webapps/cometd.war
cd $MY_SERVER
<command to run my server>

Reporting Issues

Issues, bugs and requests for enhancements should be filed at https://bugs.cometd.org

Building CometD

If you have cloned the source release, follow the instructions at https://docs.cometd.org/current/reference/#_build, or just do:

$ mvn install

CometD Benchmark

The CometD Benchmark can be run interactively or in batch mode.

To run the server interactively, open a terminal window and type:

$ cd cometd-java/cometd-java-benchmark/cometd-java-benchmark-server/
$ mvn exec:exec

Then follow the instructions printed in the terminal.

To run the client interactively, open another terminal window (potentially on another machine), and type:

$ cd cometd-java/cometd-java-benchmark/cometd-java-benchmark-client/
$ mvn exec:exec

Then follow instructions printed on the terminal to generate the load.

Extension points exported contracts — how you extend this code

JSONContextServer (Interface)
Server specific JSONContext that binds to ServerMessage.Mutable. [12 implementers]
cometd-java/cometd-java-server/cometd-java-server-common/src/main/java/org/cometd/server/JSONContextServer.java
Parser (Interface)
A blocking JSON parser. [11 implementers]
cometd-java/cometd-java-common/src/main/java/org/cometd/common/JSONContext.java
Authorizer (Interface)
Authorizers authorize Operation operations on ServerChannel channels. Authorizers can [13 implementers]
cometd-java/cometd-java-api/cometd-java-api-server/src/main/java/org/cometd/bayeux/server/Authorizer.java
Merger (Interface)
A merge strategy for object values. @param the oort object type @param the merge result type [6 implementers]
cometd-java/cometd-java-oort/cometd-java-oort-common/src/main/java/org/cometd/oort/OortObject.java
BackOffStrategy (Interface)
A strategy to controls wait times of the retry attempts in case of heartbeat failures. Method #next() [4 implementers]
cometd-java/cometd-java-client/cometd-java-client-common/src/main/java/org/cometd/client/BayeuxClient.java
Extension (Interface)
(no doc) [6 implementers]
cometd-javascript/cometd-javascript-common/src/main/webapp/js/cometd/cometd.d.ts
Caller (Interface)
Objects implementing this interface represent remote clients that performed remote calls. Server-side applicat [1 implementers]
cometd-java/cometd-java-annotation/cometd-java-annotation-server/src/main/java/org/cometd/annotation/server/RemoteCall.java
DocsSecurityPolicy (Interface)
(no doc) [3 implementers]
cometd-documentation/src/main/java/org/cometd/documentation/server/ServerAuthorizersDocs.java

Core symbols most depended-on inside this repo

get
called by 994
cometd-java/cometd-java-oort/cometd-java-oort-common/src/main/java/org/cometd/oort/OortMap.java
getChannel
called by 811
cometd-java/cometd-java-api/cometd-java-api-common/src/main/java/org/cometd/bayeux/Message.java
put
called by 664
cometd-java/cometd-java-server/cometd-java-server-common/src/main/java/org/cometd/server/ServerMessageImpl.java
size
called by 413
cometd-java/cometd-java-server/cometd-java-server-common/src/main/java/org/cometd/server/ext/BatchArrayQueue.java
waitFor
called by 402
cometd-java/cometd-java-client/cometd-java-client-common/src/main/java/org/cometd/client/BayeuxClient.java
debug
called by 383
cometd-javascript/cometd-javascript-common/src/main/webapp/js/cometd/Transport.js
addListener
called by 359
cometd-java/cometd-java-api/cometd-java-api-server/src/main/java/org/cometd/bayeux/server/BayeuxServer.java
equals
called by 320
cometd-java/cometd-java-oort/cometd-java-oort-common/src/main/java/org/cometd/oort/Seti.java

Shape

Method 4,728
Class 951
Function 167
Interface 92
Enum 18

Languages

Java90%
TypeScript10%

Modules by API surface

cometd-java/cometd-java-annotation/cometd-java-annotation-tests/src/test/java/org/cometd/annotation/ServerAnnotationProcessorTest.java228 symbols
cometd-java/cometd-java-client/cometd-java-client-common/src/main/java/org/cometd/client/BayeuxClient.java131 symbols
cometd-javascript/cometd-javascript-common/src/main/webapp/js/cometd/Client.js128 symbols
cometd-java/cometd-java-server/cometd-java-server-common/src/main/java/org/cometd/server/BayeuxServerImpl.java115 symbols
cometd-javascript/cometd-javascript-tests/src/main/resources/browser.js114 symbols
cometd-javascript/cometd-javascript-tests/src/test/resources/js/jquery/jquery-3.7.1.js112 symbols
cometd-java/cometd-java-server/cometd-java-server-common/src/main/java/org/cometd/server/ServerSessionImpl.java95 symbols
cometd-java/cometd-java-oort/cometd-java-oort-common/src/main/java/org/cometd/oort/Seti.java81 symbols
cometd-java/cometd-java-oort/cometd-java-oort-common/src/main/java/org/cometd/oort/OortObject.java70 symbols
cometd-java/cometd-java-common/src/main/java/org/cometd/common/AbstractClientSession.java70 symbols
cometd-java/cometd-java-oort/cometd-java-oort-common/src/main/java/org/cometd/oort/Oort.java67 symbols
cometd-java/cometd-java-server/cometd-java-server-common/src/main/java/org/cometd/server/http/AbstractHttpTransport.java60 symbols

For agents

$ claude mcp add cometd \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact