Permalink
Browse files

Refactor the workspace

  • Loading branch information...
1 parent 6840a95 commit fb753b2b22be413118919113062ba5c8990a72fb @jfarcand jfarcand committed Oct 14, 2010
Showing with 106 additions and 20,301 deletions.
  1. +17 −0 .gitignore
  2. +0 −22 api/pom.xml
  3. +0 −251 api/src/main/java/org/cometd/Bayeux.java
  4. +0 −26 api/src/main/java/org/cometd/BayeuxListener.java
  5. +0 −72 api/src/main/java/org/cometd/Channel.java
  6. +0 −27 api/src/main/java/org/cometd/ChannelBayeuxListener.java
  7. +0 −25 api/src/main/java/org/cometd/ChannelListener.java
  8. +0 −163 api/src/main/java/org/cometd/Client.java
  9. +0 −27 api/src/main/java/org/cometd/ClientBayeuxListener.java
  10. +0 −27 api/src/main/java/org/cometd/ClientListener.java
  11. +0 −107 api/src/main/java/org/cometd/ConfigurableChannel.java
  12. +0 −33 api/src/main/java/org/cometd/DataFilter.java
  13. +0 −36 api/src/main/java/org/cometd/DeliverListener.java
  14. +0 −57 api/src/main/java/org/cometd/Extension.java
  15. +0 −25 api/src/main/java/org/cometd/Listener.java
  16. +0 −75 api/src/main/java/org/cometd/Message.java
  17. +0 −54 api/src/main/java/org/cometd/MessageListener.java
  18. +0 −41 api/src/main/java/org/cometd/QueueListener.java
  19. +0 −33 api/src/main/java/org/cometd/RemoveListener.java
  20. +0 −67 api/src/main/java/org/cometd/SecurityPolicy.java
  21. +0 −28 api/src/main/java/org/cometd/SubscriptionListener.java
  22. +0 −1,938 bayeux/bayeux.html
  23. +0 −539 bayeux/bayeux.json
  24. BIN bayeux/bayeux.png
  25. +0 −54 bayeux/bayeux_error_codes.json
  26. +0 −20 bayeux/dojo.js
  27. BIN bayeux/intermittent-polling.pdf
  28. BIN bayeux/long-polling.pdf
  29. +0 −484 bayeux/protocol.txt
  30. BIN bayeux/streaming.pdf
  31. +0 −98 client/pom.xml
  32. +0 −136 client/src/main/java/org/cometd/client/Advice.java
  33. +0 −1,846 client/src/main/java/org/cometd/client/BayeuxClient.java
  34. +0 −103 client/src/main/java/org/cometd/client/ext/AckExtension.java
  35. +0 −76 client/src/main/java/org/cometd/client/ext/TimesyncClientExtension.java
  36. +0 −273 client/src/test/java/org/cometd/client/AckExtensionTest.java
  37. +0 −653 client/src/test/java/org/cometd/client/BayeuxClientTest.java
  38. +0 −611 client/src/test/java/org/cometd/client/BayeuxLoadGenerator.java
  39. +0 −112 client/src/test/java/org/cometd/client/BayeuxLoadServer.java
  40. +0 −384 client/src/test/java/org/cometd/client/ChatRoomClient.java
  41. +0 −88 client/src/test/java/org/cometd/client/ChatService.java
  42. +0 −239 client/src/test/java/org/cometd/client/MessageDeepCopyTest.java
  43. +0 −216 client/src/test/java/org/cometd/client/SimpleEchoBayeuxClient.java
  44. +0 −201 client/src/test/java/org/cometd/client/StatisticsHelper.java
  45. +0 −15 examples/README.txt
  46. +0 −25 examples/bin/run.sh
  47. +0 −33 examples/pom.xml
  48. +0 −95 examples/src/main/java/org/cometd/examples/ChatService.java
  49. +0 −201 examples/src/main/java/org/cometd/examples/CometdDemo.java
  50. +0 −121 examples/src/main/java/org/cometd/examples/CometdDemoServlet.java
  51. +0 −23 examples/src/main/webapp/WEB-INF/filters.json
  52. +0 −65 examples/src/main/webapp/WEB-INF/web.xml
  53. +0 −43 examples/src/main/webapp/examples/timesync/index.html
  54. +0 −14 examples/src/main/webapp/index.html
  55. BIN examples/src/test/resources/keystore
  56. +0 −33 oort/pom.xml
  57. +0 −385 oort/src/main/java/org/cometd/oort/Oort.java
  58. +0 −176 oort/src/main/java/org/cometd/oort/OortComet.java
  59. +0 −124 oort/src/main/java/org/cometd/oort/OortServlet.java
  60. +0 −398 oort/src/main/java/org/cometd/oort/Seti.java
  61. +0 −95 oort/src/main/java/org/cometd/oort/SetiServlet.java
  62. +0 −145 oort/src/test/java/org/cometd/oort/OortChatService.java
  63. +0 −117 oort/src/test/java/org/cometd/oort/OortDemo.java
  64. +0 −67 oort/src/test/java/org/cometd/oort/OortDemoServlet.java
  65. +89 −33 pom.xml
  66. +0 −59 server/pom.xml
  67. +0 −1,552 server/src/main/java/org/cometd/server/AbstractBayeux.java
  68. +0 −359 server/src/main/java/org/cometd/server/AbstractCometdServlet.java
  69. +0 −46 server/src/main/java/org/cometd/server/AbstractTransport.java
  70. +0 −452 server/src/main/java/org/cometd/server/BayeuxService.java
  71. +0 −163 server/src/main/java/org/cometd/server/ChannelId.java
  72. +0 −560 server/src/main/java/org/cometd/server/ChannelImpl.java
  73. +0 −710 server/src/main/java/org/cometd/server/ClientImpl.java
  74. +0 −102 server/src/main/java/org/cometd/server/JSONPTransport.java
  75. +0 −93 server/src/main/java/org/cometd/server/JSONTransport.java
  76. +0 −376 server/src/main/java/org/cometd/server/MessageImpl.java
  77. +0 −287 server/src/main/java/org/cometd/server/MessagePool.java
  78. +0 −36 server/src/main/java/org/cometd/server/Transport.java
  79. +0 −118 server/src/main/java/org/cometd/server/continuation/ContinuationBayeux.java
  80. +0 −223 server/src/main/java/org/cometd/server/continuation/ContinuationClient.java
  81. +0 −322 server/src/main/java/org/cometd/server/continuation/ContinuationCometdServlet.java
  82. +0 −138 server/src/main/java/org/cometd/server/ext/AcknowledgedMessagesClientExtension.java
  83. +0 −68 server/src/main/java/org/cometd/server/ext/AcknowledgedMessagesExtension.java
  84. +0 −228 server/src/main/java/org/cometd/server/ext/ArrayIdQueue.java
  85. +0 −69 server/src/main/java/org/cometd/server/ext/TimestampExtension.java
  86. +0 −171 server/src/main/java/org/cometd/server/ext/TimesyncExtension.java
  87. +0 −135 server/src/main/java/org/cometd/server/filter/JSONDataFilter.java
  88. +0 −31 server/src/main/java/org/cometd/server/filter/NoMarkupFilter.java
  89. +0 −34 server/src/main/java/org/cometd/server/filter/NoScriptsFilter.java
  90. +0 −84 server/src/main/java/org/cometd/server/filter/RegexFilter.java
  91. +0 −9 server/src/main/resources/org/cometd/server/jmx/AbstractBayeux-mbean.properties
  92. +0 −53 server/src/test/java/org/cometd/server/AbstractBayeuxClientServerTest.java
  93. +0 −84 server/src/test/java/org/cometd/server/AbstractBayeuxServerTest.java
  94. +0 −120 server/src/test/java/org/cometd/server/BayeuxServiceMetaNotificationsTest.java
  95. +0 −125 server/src/test/java/org/cometd/server/BayeuxServiceWithThreadPoolTest.java
  96. +0 −43 server/src/test/java/org/cometd/server/BrowserMappingTest.java
  97. +0 −116 server/src/test/java/org/cometd/server/ChannelIdTest.java
  98. +0 −251 server/src/test/java/org/cometd/server/ChannelImplTest.java
  99. +0 −443 server/src/test/java/org/cometd/server/ClientImplTest.java
  100. +0 −294 server/src/test/java/org/cometd/server/ConcurrentDisconnectSubscribePublishTest.java
  101. +0 −18 server/src/test/java/org/cometd/server/MessagePoolTest.java
  102. +0 −54 server/src/test/java/org/cometd/server/ServerRedeployTest.java
  103. +0 −54 server/src/test/java/org/cometd/server/ServerShutdownTest.java
  104. +0 −67 server/src/test/java/org/cometd/server/ext/ArrayIdQueueTest.java
  105. +0 −94 server/src/test/java/org/cometd/server/ext/ExtensionConnectTest.java
  106. +0 −93 server/src/test/java/org/cometd/server/ext/ExtensionDisconnectTest.java
  107. +0 −83 server/src/test/java/org/cometd/server/ext/ExtensionHandshakeTest.java
  108. +0 −116 server/src/test/java/org/cometd/server/ext/ExtensionPublishReceivedTest.java
  109. +0 −94 server/src/test/java/org/cometd/server/ext/ExtensionPublishSentTest.java
  110. +0 −95 server/src/test/java/org/cometd/server/ext/ExtensionSubscribeTest.java
  111. +0 −104 server/src/test/java/org/cometd/server/ext/ExtensionUnsubscribeTest.java
View
@@ -0,0 +1,17 @@
+*.class
+*~
+.*.swp
+.*.swo
+.loadpath
+.buildpath
+.classpath
+.project
+.settings
+.idea
+*.iml
+*.ipr
+*.iws
+nbproject
+.DS_Store
+target
+test-output
View
@@ -1,22 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <parent>
- <groupId>org.cometd.java</groupId>
- <artifactId>cometd-java-project</artifactId>
- <version>1.1.2 </version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>cometd-api</artifactId>
- <packaging>jar</packaging>
- <name>CometD :: Java :: API</name>
-
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
-</project>
@@ -1,251 +0,0 @@
-// ========================================================================
-// Copyright 2007-2008 Dojo Foundation
-// ------------------------------------------------------------------------
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//========================================================================
-
-package org.cometd;
-
-import java.util.Collection;
-import javax.servlet.http.HttpServletRequest;
-
-/* ------------------------------------------------------------ */
-/** Bayeux Server Interface.
- * <p>
- * This interface represents the server side API for the Bayeux messaging protocol.
- * <p>
- * The implementation of Bayeux will be registered as a {@link javax.servlet.ServletContext} attribute
- * with the name "org.cometd.bayeux". This may be set prior to the context being initialized
- * (if the instance is shared between contexts) or during context initialization.
- * <p>
- * Bayeux implementations must be thread safe and multiple threads may simultaneously
- * call Bayeux methods.
- *
- */
-public interface Bayeux
-{
-
- /** ServletContext attribute name used to obtain the Bayeux object */
- /* was DOJOX_COMETD_BAYEUX */
- public static final String ATTRIBUTE ="org.cometd.bayeux";
-
- /**Meta definitions for channels*/
- public static final String META="/meta";
- /**Meta definitions for channels*/
- public static final String META_SLASH="/meta/";
- /**Meta definitions for channels - connect message*/
- public static final String META_CONNECT="/meta/connect";
- /**Meta definitions for channels - client messsage*/
- public static final String META_CLIENT="/meta/client";
- /**Meta definitions for channels - disconnect messsage*/
- public static final String META_DISCONNECT="/meta/disconnect";
- /**Meta definitions for channels - handshake messsage*/
- public static final String META_HANDSHAKE="/meta/handshake";
- /**Meta definitions for channels - ping messsage*/
- public static final String META_PING="/meta/ping";
- /**Meta definitions for channels - status messsage*/
- public static final String META_STATUS="/meta/status";
- /**Meta definitions for channels - subscribe messsage*/
- public static final String META_SUBSCRIBE="/meta/subscribe";
- /**Meta definitions for channels - unsubscribe messsage*/
- public static final String META_UNSUBSCRIBE="/meta/unsubscribe";
- /*Field names inside Bayeux messages*/
- /**Field names inside Bayeux messages - clientId field*/
- public static final String CLIENT_FIELD="clientId";
- /**Field names inside Bayeux messages - data field*/
- public static final String DATA_FIELD="data";
- /**Field names inside Bayeux messages - channel field*/
- public static final String CHANNEL_FIELD="channel";
- /**Field names inside Bayeux messages - id field*/
- public static final String ID_FIELD="id";
- /**Field names inside Bayeux messages - error field*/
- public static final String ERROR_FIELD="error";
- /**Field names inside Bayeux messages - timestamp field*/
- public static final String TIMESTAMP_FIELD="timestamp";
- /**Field names inside Bayeux messages - transport field*/
- public static final String TRANSPORT_FIELD="transport";
- /**Field names inside Bayeux messages - advice field*/
- public static final String ADVICE_FIELD="advice";
- /**Field names inside Bayeux messages - successful field*/
- public static final String SUCCESSFUL_FIELD="successful";
- /**Field names inside Bayeux messages - subscription field*/
- public static final String SUBSCRIPTION_FIELD="subscription";
- /**Field names inside Bayeux messages - ext field*/
- public static final String EXT_FIELD="ext";
- /**Field names inside Bayeux messages - connectionType field*/
- public static final String CONNECTION_TYPE_FIELD="connectionType";
- /**Field names inside Bayeux messages - version field*/
- public static final String VERSION_FIELD="version";
- /**Field names inside Bayeux messages - minimumVersion field*/
- public static final String MIN_VERSION_FIELD="minimumVersion";
- /**Field names inside Bayeux messages - supportedConnectionTypes field*/
- public static final String SUPPORTED_CONNECTION_TYPES_FIELD ="supportedConnectionTypes";
- /**Field names inside Bayeux messages - json-comment-filtered field*/
- public static final String JSON_COMMENT_FILTERED_FIELD="json-comment-filtered";
- /**Field names inside Bayeux messages - reconnect field*/
- public static final String RECONNECT_FIELD = "reconnect";
- /**Field names inside Bayeux messages - interval field*/
- public static final String INTERVAL_FIELD = "interval";
- /**Field values inside Bayeux messages - retry response*/
- public static final String RETRY_RESPONSE = "retry";
- /**Field values inside Bayeux messages - handshake response*/
- public static final String HANDSHAKE_RESPONSE = "handshake";
- /**Field values inside Bayeux messages - none response*/
- public static final String NONE_RESPONSE = "none";
- /**Service channel names-starts with*/
- public static final String SERVICE="/service";
- /**Service channel names-trailing slash*/
- public static final String SERVICE_SLASH="/service/";
- /*Transport types*/
- /**Transport types - long polling*/
- public static final String TRANSPORT_LONG_POLL="long-polling";
- /**Transport types - callback polling*/
- public static final String TRANSPORT_CALLBACK_POLL="callback-polling";
- /**Transport types - iframe*/
- public static final String TRANSPORT_IFRAME="iframe";
- /**Transport types - flash*/
- public static final String TRANSPORT_FLASH="flash";
-
- /*http field names*/
- /**http helpers - application/json content type*/
- public static final String JSON_CONTENT_TYPE="application/json;charset=UTF-8";
- /**http helpers - parameter name for json message*/
- public static final String MESSAGE_PARAMETER="message";
- /**http helpers - name of the jsonp parameter*/
- public static final String JSONP_PARAMETER="jsonp";
- /**http helpers - default name of the jsonp callback function*/
- public static final String JSONP_DEFAULT_NAME="jsonpcallback";
-
- /* ------------------------------------------------------------ */
- /** Get a Channel instance by ID.
- * @param channelId The Channel ID
- * @param create If true, a channel will be created if it does not exist.
- * @return A Channel instance or null if it does not exist and create is false.
- */
- public Channel getChannel(String channelId, boolean create);
-
- /* ------------------------------------------------------------ */
- /** Check if channel exists.
- * @param channel
- * @return True if Bayeux has a channel with the channel name.
- */
- public boolean hasChannel(String channel);
-
- /* ------------------------------------------------------------ */
- public Channel removeChannel(String channel);
-
- /* ------------------------------------------------------------ */
- /** Get all known channels.
- * @return A collection of all known channel instances.
- */
- public Collection<Channel> getChannels();
-
- /* ------------------------------------------------------------ */
- /** Get {@link Client} by ID.
- * @param clientId
- * @return A Client instance or null if the ID is not known
- */
- public Client getClient(String clientId);
-
- /* ------------------------------------------------------------ */
- public boolean hasClient(String clientId);
-
- /* ------------------------------------------------------------ */
- /** Create a new server side Client.
- * Server side clients can be used to interact with Bayeux with
- * publish and subscribe messaging.
- * @param idprefix An identifier to prefix to the client ID.
- * @return A {@link Client} instance with {@link Client#isLocal()} returning true.
- */
- public Client newClient(String idprefix);
-
- /* ------------------------------------------------------------ */
- public Client removeClient(String clientId);
-
- /* ------------------------------------------------------------ */
- /** Get a collection of all Clients.
- * The collection is copy of the underlying collection.
- * @return Collection of clients.
- */
- public Collection<Client> getClients();
-
- /* ------------------------------------------------------------ */
- /** Get the {@link SecurityPolicy} instance.
- * @return The current {@link SecurityPolicy} instance.
- */
- public SecurityPolicy getSecurityPolicy();
-
- /* ------------------------------------------------------------ */
- /** Set the security policy for the Bayeux instance.
- * <p>
- * The Security Policy will be called to check access for all handshakes,
- * subscriptions and publishing.
- *
- * @param securityPolicy The security policy instance.
- */
- public void setSecurityPolicy(SecurityPolicy securityPolicy);
-
- /* ------------------------------------------------------------ */
- /** Adds a bayeux extension.
- * A bayeux extension may modify a message or return a new message.
- * @param ext the extension to add
- * @see #removeExtension(Extension)
- */
- public void addExtension(Extension ext);
-
- /**
- * Removes a bayeux extension.
- * @param ext the extension to remove
- * @see #addExtension(Extension)
- */
- public void removeExtension(Extension ext);
-
- /* ------------------------------------------------------------ */
- /**
- * Adds a bayeux listener,
- * @param listener the listener to add
- * @see #removeListener(BayeuxListener)
- */
- public void addListener(BayeuxListener listener);
-
- /**
- * Removes a bayeux listener
- * @param listener the listener to remove
- * @see #addListener(BayeuxListener)
- */
- public void removeListener(BayeuxListener listener);
-
- /* ------------------------------------------------------------ */
- /**
- * @return the max client queue size
- * @see #setMaxClientQueue(int)
- */
- public int getMaxClientQueue();
-
- /* ------------------------------------------------------------ */
- /**
- * @param size The size which if a client queue exceeds, forces a call to
- * {@link QueueListener#queueMaxed(Client, Message)} to check if the message should be
- * added. If set to -1, there is no queue limit. If set to zero, messages are
- * not queued unless a {@link QueueListener} is applied that returns true.
- * @see #getMaxClientQueue()
- */
- public void setMaxClientQueue(int size);
-
- /* ------------------------------------------------------------ */
- /** Get the current Servlet Request.
- * If the calling thread is in the context of a servlet call, then
- * return the request object. This can be used to authenticate users and/or
- * perform other validation of the caller.
- * @return A servlet request or null if none in scope.
- */
- public HttpServletRequest getCurrentRequest();
-}
@@ -1,26 +0,0 @@
-// ========================================================================
-// Copyright 2008 Dojo Foundation
-// ------------------------------------------------------------------------
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//========================================================================
-package org.cometd;
-
-import java.util.EventListener;
-
-
-/**
- * A marker interface for all interfaces that listen for Bayeux events
- *
- */
-public interface BayeuxListener extends EventListener
-{
-
-}
@@ -1,72 +0,0 @@
-// ========================================================================
-// Copyright 2007-2008 Dojo Foundation
-// ------------------------------------------------------------------------
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//========================================================================
-
-package org.cometd;
-
-import java.util.Collection;
-
-/**
- * <p>A Bayeux channel.</p>
- * <p>A Channel represents a routing path for messages to {@link Client}s, and
- * looks like a directory path:
- * <pre>
- * /some/channel
- * </pre>
- * Clients may subscribe to a channel and will be delivered all messages
- * published to the channel.</p>
- * <p>Channels may be <em>lazy</em>, which means that all messages published to that channel
- * will be marked as lazy. Lazy messages are queued but do not wake up waiting clients.</p>
- *
- * @version $Revision: 686 $ $Date: 2009-07-03 11:07:24 +0200 (Fri, 03 Jul 2009) $
- */
-public interface Channel extends ConfigurableChannel
-{
- /**
- * @return true if the channel has been removed, false if it was not possible to remove the channel
- */
- public boolean remove();
-
- /**
- * Publishes a message.
- * @param fromClient the client source of the message, or null
- * @param data the message data
- * @param msgId the message ID or null
- */
- public void publish(Client fromClient, Object data, String msgId);
-
- /**
- * Subscribes the given {@link Client} to this channel.
- * @param subscriber the client to subscribe
- * @see #unsubscribe(Client)
- */
- public void subscribe(Client subscriber);
-
- /**
- * Unsubscribes the given {@link Client} from this channel.
- * @param subscriber the client to unsubscribe
- * @see #subscribe(Client)
- */
- public void unsubscribe(Client subscriber);
-
- /**
- * Returns a collection that is a copy of clients subscribed to this channel.
- * @return the clients subscribed to this channel
- */
- public Collection<Client> getSubscribers();
-
- /**
- * @return the number of clients subscribed to this channel
- */
- public int getSubscriberCount();
-}
Oops, something went wrong.

0 comments on commit fb753b2

Please sign in to comment.