summaryrefslogtreecommitdiff
path: root/spring-messaging
diff options
context:
space:
mode:
Diffstat (limited to 'spring-messaging')
-rw-r--r--spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java14
-rw-r--r--spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java4
-rw-r--r--spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompSession.java24
-rw-r--r--spring-messaging/src/main/java/org/springframework/messaging/simp/user/MultiServerUserRegistry.java14
4 files changed, 29 insertions, 27 deletions
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java
index b81c1823..9ef7a78e 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -65,18 +65,20 @@ import org.springframework.validation.Validator;
* protocols such as STOMP.
*
* <p>{@link #clientInboundChannel()} and {@link #clientOutboundChannel()} deliver
- * messages to and from remote clients to several message handlers such as
+ * messages to and from remote clients to several message handlers such as the
+ * following.
* <ul>
* <li>{@link #simpAnnotationMethodMessageHandler()}</li>
* <li>{@link #simpleBrokerMessageHandler()}</li>
* <li>{@link #stompBrokerRelayMessageHandler()}</li>
* <li>{@link #userDestinationMessageHandler()}</li>
* </ul>
- * while {@link #brokerChannel()} delivers messages from within the application to the
+ *
+ * <p>{@link #brokerChannel()} delivers messages from within the application to the
* the respective message handlers. {@link #brokerMessagingTemplate()} can be injected
* into any application component to send messages.
*
- * <p>Subclasses are responsible for the part of the configuration that feed messages
+ * <p>Subclasses are responsible for the parts of the configuration that feed messages
* to and from the client inbound/outbound channels (e.g. STOMP over WebSocket).
*
* @author Rossen Stoyanchev
@@ -387,7 +389,7 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC
* Override this method to add custom message converters.
* @param messageConverters the list to add converters to, initially empty
* @return {@code true} if default message converters should be added to list,
- * {@code false} if no more converters should be added.
+ * {@code false} if no more converters should be added
*/
protected boolean configureMessageConverters(List<MessageConverter> messageConverters) {
return true;
@@ -410,7 +412,7 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC
}
/**
- * Create the user registry that provides access to the local users.
+ * Create the user registry that provides access to local users.
*/
protected abstract SimpUserRegistry createLocalUserRegistry();
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java
index d4700498..bdd0e14f 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -258,7 +258,7 @@ public class StompDecoder {
if (index + 1 >= inString.length()) {
throw new StompConversionException("Illegal escape sequence at index " + index + ": " + inString);
}
- Character c = inString.charAt(index + 1);
+ char c = inString.charAt(index + 1);
if (c == 'r') {
sb.append('\r');
}
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompSession.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompSession.java
index bc358a92..8851a394 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompSession.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompSession.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,8 +17,8 @@
package org.springframework.messaging.simp.stomp;
/**
- * Represents a STOMP session with operations to send messages, create
- * subscriptions and receive messages on those subscriptions.
+ * Represents a STOMP session with operations to send messages,
+ * create subscriptions and receive messages on those subscriptions.
*
* @author Rossen Stoyanchev
* @since 4.2
@@ -37,10 +37,10 @@ public interface StompSession {
/**
* When enabled, a receipt header is automatically added to future
- * {@code send} and {@code subscribe} operations on this session, which causes
- * the server to return a RECEIPT. An application can then use the
- * {@link StompSession.Receiptable
- * Receiptable} returned from the operation to track the receipt.
+ * {@code send} and {@code subscribe} operations on this session, which
+ * causes the server to return a RECEIPT. An application can then use
+ * the {@link StompSession.Receiptable Receiptable} returned from the
+ * operation to track the receipt.
* <p>A receipt header can also be added manually through the overloaded
* methods that accept {@code StompHeaders}.
*/
@@ -57,11 +57,11 @@ public interface StompSession {
Receiptable send(String destination, Object payload);
/**
- * An overloaded version of {@link #send(String, Object)} that accepts
- * full {@link StompHeaders} instead of a destination. The headers must
+ * An overloaded version of {@link #send(String, Object)} with full
+ * {@link StompHeaders} instead of just a destination. The headers must
* contain a destination and may also have other headers such as
- * "content-type" or custom headers for the broker to propagate to subscribers,
- * or broker-specific, non-standard headers..
+ * "content-type" or custom headers for the broker to propagate to
+ * subscribers, or broker-specific, non-standard headers.
* @param headers the message headers
* @param payload the message payload
* @return a Receiptable for tracking receipts
@@ -79,7 +79,7 @@ public interface StompSession {
/**
* An overloaded version of {@link #subscribe(String, StompFrameHandler)}
- * that accepts full {@link StompHeaders} rather instead of a destination.
+ * with full {@link StompHeaders} instead of just a destination.
* @param headers the headers for the subscribe message frame
* @param handler the handler for received messages
* @return a handle to use to unsubscribe and/or track receipts
diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/user/MultiServerUserRegistry.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/MultiServerUserRegistry.java
index f155ec70..efe489fc 100644
--- a/spring-messaging/src/main/java/org/springframework/messaging/simp/user/MultiServerUserRegistry.java
+++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/MultiServerUserRegistry.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -63,7 +63,7 @@ public class MultiServerUserRegistry implements SimpUserRegistry, SmartApplicati
* Create an instance wrapping the local user registry.
*/
public MultiServerUserRegistry(SimpUserRegistry localRegistry) {
- Assert.notNull(localRegistry, "'localRegistry' is required.");
+ Assert.notNull(localRegistry, "'localRegistry' is required");
this.id = generateId();
this.localRegistry = localRegistry;
this.delegateApplicationEvents = this.localRegistry instanceof SmartApplicationListener;
@@ -274,10 +274,10 @@ public class MultiServerUserRegistry implements SimpUserRegistry, SmartApplicati
private String name;
- /* User sessions from "this" registry only (i.e. one server) */
+ // User sessions from "this" registry only (i.e. one server)
private Set<TransferSimpSession> sessions;
- /* Cross-server session lookup (e.g. user connected to multiple servers) */
+ // Cross-server session lookup (e.g. user connected to multiple servers)
private SessionLookup sessionLookup;
/**
@@ -518,13 +518,13 @@ public class MultiServerUserRegistry implements SimpUserRegistry, SmartApplicati
return false;
}
SimpSubscription otherSubscription = (SimpSubscription) other;
- return (ObjectUtils.nullSafeEquals(getSession(), otherSubscription.getSession()) &&
- this.id.equals(otherSubscription.getId()));
+ return (getId().equals(otherSubscription.getId()) &&
+ ObjectUtils.nullSafeEquals(getSession(), otherSubscription.getSession()));
}
@Override
public int hashCode() {
- return this.id.hashCode() * 31 + ObjectUtils.nullSafeHashCode(getSession());
+ return getId().hashCode() * 31 + ObjectUtils.nullSafeHashCode(getSession());
}
@Override