Browse Source

Create messaging.simp.broker package

pull/425/head
Rossen Stoyanchev 11 years ago
parent
commit
89455c00f6
  1. 5
      spring-messaging/src/main/java/org/springframework/messaging/simp/broker/AbstractBrokerMessageHandler.java
  2. 2
      spring-messaging/src/main/java/org/springframework/messaging/simp/broker/AbstractSubscriptionRegistry.java
  3. 2
      spring-messaging/src/main/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistry.java
  4. 6
      spring-messaging/src/main/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandler.java
  5. 2
      spring-messaging/src/main/java/org/springframework/messaging/simp/broker/SubscriptionRegistry.java
  6. 5
      spring-messaging/src/main/java/org/springframework/messaging/simp/broker/package-info.java
  7. 2
      spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractBrokerRegistration.java
  8. 4
      spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java
  9. 2
      spring-messaging/src/main/java/org/springframework/messaging/simp/config/MessageBrokerRegistry.java
  10. 2
      spring-messaging/src/main/java/org/springframework/messaging/simp/config/SimpleBrokerRegistration.java
  11. 2
      spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java
  12. 5
      spring-messaging/src/test/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistryTests.java
  13. 3
      spring-messaging/src/test/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandlerTests.java
  14. 2
      spring-messaging/src/test/java/org/springframework/messaging/simp/config/MessageBrokerConfigurationTests.java
  15. 2
      spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java
  16. 2
      spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.0.xsd
  17. 2
      spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java

5
spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AbstractBrokerMessageHandler.java → spring-messaging/src/main/java/org/springframework/messaging/simp/broker/AbstractBrokerMessageHandler.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.messaging.simp.handler;
package org.springframework.messaging.simp.broker;
import java.util.Collection;
import java.util.Collections;
@ -32,6 +32,9 @@ import org.springframework.messaging.simp.BrokerAvailabilityEvent; @@ -32,6 +32,9 @@ import org.springframework.messaging.simp.BrokerAvailabilityEvent;
import org.springframework.util.CollectionUtils;
/**
* Abstract base class for a {@link MessageHandler} that manages subscriptions and
* propagates messages to subscribers.
*
* @author Rossen Stoyanchev
* @since 4.0
*/

2
spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AbstractSubscriptionRegistry.java → spring-messaging/src/main/java/org/springframework/messaging/simp/broker/AbstractSubscriptionRegistry.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.messaging.simp.handler;
package org.springframework.messaging.simp.broker;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

2
spring-messaging/src/main/java/org/springframework/messaging/simp/handler/DefaultSubscriptionRegistry.java → spring-messaging/src/main/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistry.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.messaging.simp.handler;
package org.springframework.messaging.simp.broker;
import java.util.Collection;
import java.util.HashSet;

6
spring-messaging/src/main/java/org/springframework/messaging/simp/handler/SimpleBrokerMessageHandler.java → spring-messaging/src/main/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandler.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.messaging.simp.handler;
package org.springframework.messaging.simp.broker;
import java.util.Collection;
@ -28,6 +28,10 @@ import org.springframework.util.Assert; @@ -28,6 +28,10 @@ import org.springframework.util.Assert;
import org.springframework.util.MultiValueMap;
/**
* A "simple" message broker that recognizes the message types defined in
* {@link SimpMessageType}, keeps track of subscriptions with the help of a
* {@link SubscriptionRegistry} and sends messages to subscribers.
*
* @author Rossen Stoyanchev
* @since 4.0
*/

2
spring-messaging/src/main/java/org/springframework/messaging/simp/handler/SubscriptionRegistry.java → spring-messaging/src/main/java/org/springframework/messaging/simp/broker/SubscriptionRegistry.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.messaging.simp.handler;
package org.springframework.messaging.simp.broker;
import org.springframework.messaging.Message;
import org.springframework.util.MultiValueMap;

5
spring-messaging/src/main/java/org/springframework/messaging/simp/broker/package-info.java

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
/**
* Provides a "simple" message broker implementation along with an abstract base
* class and other supporting types such as a registry for subscriptions.
*/
package org.springframework.messaging.simp.broker;

2
spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractBrokerRegistration.java

@ -23,7 +23,7 @@ import java.util.List; @@ -23,7 +23,7 @@ import java.util.List;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;
import org.springframework.messaging.simp.handler.AbstractBrokerMessageHandler;
import org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler;
import org.springframework.util.Assert;
/**

4
spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java

@ -29,10 +29,10 @@ import org.springframework.messaging.converter.MessageConverter; @@ -29,10 +29,10 @@ import org.springframework.messaging.converter.MessageConverter;
import org.springframework.messaging.converter.StringMessageConverter;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler;
import org.springframework.messaging.simp.handler.AbstractBrokerMessageHandler;
import org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler;
import org.springframework.messaging.simp.handler.DefaultUserDestinationResolver;
import org.springframework.messaging.simp.handler.DefaultUserSessionRegistry;
import org.springframework.messaging.simp.handler.SimpleBrokerMessageHandler;
import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler;
import org.springframework.messaging.simp.handler.UserDestinationMessageHandler;
import org.springframework.messaging.simp.handler.UserDestinationResolver;
import org.springframework.messaging.simp.handler.UserSessionRegistry;

2
spring-messaging/src/main/java/org/springframework/messaging/simp/config/MessageBrokerRegistry.java

@ -21,7 +21,7 @@ import java.util.Collection; @@ -21,7 +21,7 @@ import java.util.Collection;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;
import org.springframework.messaging.simp.handler.SimpleBrokerMessageHandler;
import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler;
import org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler;
import org.springframework.util.Assert;

2
spring-messaging/src/main/java/org/springframework/messaging/simp/config/SimpleBrokerRegistration.java

@ -18,7 +18,7 @@ package org.springframework.messaging.simp.config; @@ -18,7 +18,7 @@ package org.springframework.messaging.simp.config;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;
import org.springframework.messaging.simp.handler.SimpleBrokerMessageHandler;
import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler;
/**
* Registration class for configuring a {@link SimpleBrokerMessageHandler}.

2
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java

@ -27,7 +27,7 @@ import org.springframework.messaging.MessageDeliveryException; @@ -27,7 +27,7 @@ import org.springframework.messaging.MessageDeliveryException;
import org.springframework.messaging.SubscribableChannel;
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
import org.springframework.messaging.simp.SimpMessageType;
import org.springframework.messaging.simp.handler.AbstractBrokerMessageHandler;
import org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.messaging.tcp.FixedIntervalReconnectStrategy;
import org.springframework.messaging.tcp.TcpConnection;

5
spring-messaging/src/test/java/org/springframework/messaging/simp/handler/DefaultSubscriptionRegistryTests.java → spring-messaging/src/test/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistryTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.messaging.simp.handler;
package org.springframework.messaging.simp.broker;
import java.util.Arrays;
import java.util.Collections;
@ -25,13 +25,14 @@ import org.junit.Test; @@ -25,13 +25,14 @@ import org.junit.Test;
import org.springframework.messaging.Message;
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
import org.springframework.messaging.simp.SimpMessageType;
import org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.util.MultiValueMap;
import static org.junit.Assert.*;
/**
* Test fixture for {@link DefaultSubscriptionRegistry}.
* Test fixture for {@link org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry}.
*
* @author Rossen Stoyanchev
*/

3
spring-messaging/src/test/java/org/springframework/messaging/simp/handler/SimpleBrokerMessageHandlerTests.java → spring-messaging/src/test/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandlerTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.messaging.simp.handler;
package org.springframework.messaging.simp.broker;
import java.util.Collections;
@ -29,6 +29,7 @@ import org.springframework.messaging.MessageChannel; @@ -29,6 +29,7 @@ import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
import org.springframework.messaging.simp.SimpMessageType;
import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler;
import org.springframework.messaging.support.MessageBuilder;
import static org.junit.Assert.*;

2
spring-messaging/src/test/java/org/springframework/messaging/simp/config/MessageBrokerConfigurationTests.java

@ -34,7 +34,7 @@ import org.springframework.messaging.handler.annotation.SendTo; @@ -34,7 +34,7 @@ import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.messaging.simp.SimpMessageType;
import org.springframework.messaging.simp.annotation.SubscribeMapping;
import org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler;
import org.springframework.messaging.simp.handler.SimpleBrokerMessageHandler;
import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler;
import org.springframework.messaging.simp.handler.UserDestinationMessageHandler;
import org.springframework.messaging.simp.handler.UserSessionRegistry;
import org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler;

2
spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java

@ -41,7 +41,7 @@ import org.springframework.messaging.simp.SimpMessagingTemplate; @@ -41,7 +41,7 @@ import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler;
import org.springframework.messaging.simp.handler.DefaultUserDestinationResolver;
import org.springframework.messaging.simp.handler.DefaultUserSessionRegistry;
import org.springframework.messaging.simp.handler.SimpleBrokerMessageHandler;
import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler;
import org.springframework.messaging.simp.handler.UserDestinationMessageHandler;
import org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler;
import org.springframework.messaging.support.ExecutorSubscribableChannel;

2
spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.0.xsd

@ -294,7 +294,7 @@ @@ -294,7 +294,7 @@
<xsd:complexType name="simple-broker">
<xsd:annotation>
<xsd:documentation source="java:org.springframework.messaging.simp.handler.SimpleBrokerMessageHandler"><![CDATA[
<xsd:documentation source="java:org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler"><![CDATA[
Configures a SimpleBrokerMessageHandler that handles messages as a simple message broker implementation.
]]></xsd:documentation>
</xsd:annotation>

2
spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java

@ -32,7 +32,7 @@ import org.springframework.messaging.converter.MessageConverter; @@ -32,7 +32,7 @@ import org.springframework.messaging.converter.MessageConverter;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler;
import org.springframework.messaging.simp.handler.DefaultUserDestinationResolver;
import org.springframework.messaging.simp.handler.SimpleBrokerMessageHandler;
import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler;
import org.springframework.messaging.simp.handler.UserDestinationMessageHandler;
import org.springframework.messaging.simp.handler.UserDestinationResolver;
import org.springframework.messaging.simp.handler.UserSessionRegistry;

Loading…
Cancel
Save