Skip to content

Commit 6825aaf

Browse files
committed
Add Javadoc
1 parent 59ef34d commit 6825aaf

File tree

72 files changed

+259
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+259
-146
lines changed

spring-websocket/src/main/java/org/springframework/web/socket/BinaryMessage.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
*
2626
* @author Rossen Stoyanchev
2727
* @since 4.0
28-
* @see WebSocketMessage
2928
*/
3029
public final class BinaryMessage extends WebSocketMessage<ByteBuffer> {
3130

spring-websocket/src/main/java/org/springframework/web/socket/WebSocketHandler.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@
1919
/**
2020
* A handler for WebSocket messages and lifecycle events.
2121
*
22-
* <p> Implementations of this interface are encouraged to handle exceptions locally where
23-
* it makes sense or alternatively let the exception bubble up in which case the exception
24-
* is logged and the session closed with {@link CloseStatus#SERVER_ERROR SERVER_ERROR(1011)} by default.
25-
* The exception handling strategy is provided by
26-
* {@link org.springframework.web.socket.support.ExceptionWebSocketHandlerDecorator ExceptionWebSocketHandlerDecorator},
27-
* which can be customized or replaced by decorating the {@link WebSocketHandler} with a
28-
* different decorator.
22+
* <p>
23+
* Implementations of this interface are encouraged to handle exceptions locally where it
24+
* makes sense or alternatively let the exception bubble up in which case the exception is
25+
* logged and the session closed with {@link CloseStatus#SERVER_ERROR SERVER_ERROR(1011)}
26+
* by default. The exception handling strategy is provided by
27+
* {@link org.springframework.web.socket.support.ExceptionWebSocketHandlerDecorator
28+
* ExceptionWebSocketHandlerDecorator}, which can be customized or replaced by decorating
29+
* the {@link WebSocketHandler} with a different decorator.
2930
*
3031
* @param <T> The type of message being handled {@link TextMessage}, {@link BinaryMessage}
3132
* (or {@link WebSocketMessage} for both).

spring-websocket/src/main/java/org/springframework/web/socket/WebSocketMessage.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
import org.springframework.util.ObjectUtils;
2121

2222
/**
23-
* A message that can be handled or sent during a WebSocket interaction. There are only
24-
* two sub-classes {@link BinaryMessage} or a {@link TextMessage} with no further
25-
* sub-classing expected.
23+
* A message that can be handled or sent on a WebSocket connection.
2624
*
2725
* @author Rossen Stoyanchev
2826
* @since 4.0
@@ -43,7 +41,6 @@ public abstract class WebSocketMessage<T> {
4341
this.payload = payload;
4442
}
4543

46-
4744
/**
4845
* Returns the message payload. This will never be {@code null}.
4946
*/

spring-websocket/src/main/java/org/springframework/web/socket/WebSocketSession.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
package org.springframework.web.socket;
1818

1919
import java.io.IOException;
20-
import java.net.InetSocketAddress;
2120
import java.net.URI;
2221
import java.security.Principal;
2322

2423
/**
25-
* Allows sending messages over a WebSocket connection as well as closing it.
24+
* A WebSocket session abstraction. Allows sending messages over a WebSocket connection
25+
* and closing it.
2626
*
2727
* @author Rossen Stoyanchev
2828
* @since 4.0

spring-websocket/src/main/java/org/springframework/web/socket/adapter/AbstractWebSocketSesssionAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
/**
31-
* An base class for implementations adapting {@link WebSocketSession}.
31+
* An abstract base class for implementations of {@link WebSocketSession}.
3232
*
3333
* @author Rossen Stoyanchev
3434
* @since 4.0

spring-websocket/src/main/java/org/springframework/web/socket/adapter/BinaryWebSocketHandlerAdapter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525

2626

2727
/**
28-
* A {@link WebSocketHandler} for binary messages with empty methods.
28+
* A convenient base class for {@link WebSocketHandler} implementation that process binary
29+
* messages only. Text messages are rejected with {@link CloseStatus#NOT_ACCEPTABLE}. All
30+
* other methods have empty implementations.
2931
*
3032
* @author Rossen Stoyanchev
3133
* @author Phillip Webb

spring-websocket/src/main/java/org/springframework/web/socket/adapter/ConfigurableWebSocketSession.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424

2525
/**
26+
* A WebSocketSession with configurable properties.
27+
*
2628
* @author Rossen Stoyanchev
2729
* @since 4.0
2830
*/

spring-websocket/src/main/java/org/springframework/web/socket/adapter/JettyWebSocketListenerAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.springframework.web.socket.support.ExceptionWebSocketHandlerDecorator;
2929

3030
/**
31-
* Adapts Spring's {@link WebSocketHandler} to Jetty's {@link WebSocketListener}.
31+
* Adapts {@link WebSocketHandler} to the Jetty 9 {@link WebSocketListener}.
3232
*
3333
* @author Phillip Webb
3434
* @since 4.0

spring-websocket/src/main/java/org/springframework/web/socket/adapter/JettyWebSocketSessionAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131

3232

3333
/**
34-
* Adapts Jetty's {@link Session} to Spring's {@link WebSocketSession}.
34+
* Adapts a Jetty {@link org.eclipse.jetty.websocket.api.Session} to
35+
* {@link WebSocketSession}.
3536
*
3637
* @author Phillip Webb
3738
* @author Rossen Stoyanchev

spring-websocket/src/main/java/org/springframework/web/socket/adapter/StandardEndpointAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535

3636
/**
37-
* A wrapper around a {@link WebSocketHandler} that adapts it to {@link Endpoint}.
37+
* Adapts a {@link WebSocketHandler} to a standard {@link Endpoint}.
3838
*
3939
* @author Rossen Stoyanchev
4040
* @since 4.0

0 commit comments

Comments
 (0)