Fix javadoc checkstyle issues

Fix checkstyle violations for javadoc.

Issue: SPR-16968
This commit is contained in:
Phillip Webb
2018-06-20 18:45:54 -07:00
committed by Juergen Hoeller
parent 032096d699
commit e0480f75ac
928 changed files with 3729 additions and 2686 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 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.
@@ -24,6 +24,7 @@ import org.springframework.util.ObjectUtils;
*
* @author Rossen Stoyanchev
* @since 4.0
* @param <T> the payload type
*/
public abstract class AbstractWebSocketMessage<T> implements WebSocketMessage<T> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 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.
@@ -21,6 +21,7 @@ package org.springframework.web.socket;
*
* @author Rossen Stoyanchev
* @since 4.0
* @param <T> the payload type
*/
public interface WebSocketMessage<T> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -38,6 +38,7 @@ import org.springframework.web.socket.WebSocketSession;
*
* @author Rossen Stoyanchev
* @since 4.0
* @param <T> the native session type
*/
public abstract class AbstractWebSocketSession<T> implements NativeWebSocketSession {

View File

@@ -21,6 +21,9 @@ import org.eclipse.jetty.websocket.api.extensions.ExtensionConfig;
import org.springframework.web.socket.WebSocketExtension;
/**
* Adapter class to convert a {@link WebSocketExtension} to a Jetty
* {@link ExtensionConfig}.
*
* @author Rossen Stoyanchev
* @since 4.0
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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,12 +65,12 @@ import org.springframework.web.context.ContextLoader;
*
* @author Phillip Webb
* @since 4.0
* @param <T> the type being converted to (for Encoder) or from (for Decoder)
* @param <M> the WebSocket message type ({@link String} or {@link ByteBuffer})
* @see ConvertingEncoderDecoderSupport.BinaryEncoder
* @see ConvertingEncoderDecoderSupport.BinaryDecoder
* @see ConvertingEncoderDecoderSupport.TextEncoder
* @see ConvertingEncoderDecoderSupport.TextDecoder
* @param <T> the type being converted to (for Encoder) or from (for Decoder)
* @param <M> the WebSocket message type ({@link String} or {@link ByteBuffer})
*/
public abstract class ConvertingEncoderDecoderSupport<T, M> {
@@ -78,6 +78,7 @@ public abstract class ConvertingEncoderDecoderSupport<T, M> {
/**
* Called to initialize the encoder/decoder.
* @see javax.websocket.Encoder#init(EndpointConfig)
* @see javax.websocket.Decoder#init(EndpointConfig)
*/
@@ -91,6 +92,7 @@ public abstract class ConvertingEncoderDecoderSupport<T, M> {
}
/**
* Called to destroy the encoder/decoder.
* @see javax.websocket.Encoder#destroy()
* @see javax.websocket.Decoder#destroy()
*/
@@ -154,6 +156,7 @@ public abstract class ConvertingEncoderDecoderSupport<T, M> {
}
/**
* Encode an object to a message.
* @see javax.websocket.Encoder.Text#encode(Object)
* @see javax.websocket.Encoder.Binary#encode(Object)
*/
@@ -169,6 +172,8 @@ public abstract class ConvertingEncoderDecoderSupport<T, M> {
}
/**
* Determine if a given message can be decoded.
* @see #decode(Object)
* @see javax.websocket.Decoder.Text#willDecode(String)
* @see javax.websocket.Decoder.Binary#willDecode(ByteBuffer)
*/
@@ -177,6 +182,7 @@ public abstract class ConvertingEncoderDecoderSupport<T, M> {
}
/**
* Decode the a message into an object.
* @see javax.websocket.Decoder.Text#decode(String)
* @see javax.websocket.Decoder.Binary#decode(ByteBuffer)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -111,7 +111,7 @@ public abstract class AbstractWebSocketClient implements WebSocketClient {
/**
* Perform the actual handshake to establish a connection to the server.
* @param webSocketHandler the client-side handler for WebSocket messages
* @param headers HTTP headers to use for the handshake, with unwanted (forbidden)
* @param headers the HTTP headers to use for the handshake, with unwanted (forbidden)
* headers filtered out (never {@code null})
* @param uri the target URI for the handshake (never {@code null})
* @param subProtocols requested sub-protocols, or an empty list

View File

@@ -170,8 +170,8 @@ public class JettyWebSocketClient extends AbstractWebSocketClient implements Lif
}
/**
* @return the user to make available through {@link WebSocketSession#getPrincipal()};
* by default this method returns {@code null}
* Return the user to make available through {@link WebSocketSession#getPrincipal()}.
* By default this method returns {@code null}
*/
@Nullable
protected Principal getUser() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -43,7 +43,7 @@ import org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler;
* Parses the configuration for the {@code <websocket:handlers/>} namespace
* element. Registers a Spring MVC {@code SimpleUrlHandlerMapping} to map HTTP
* WebSocket handshake (or SockJS) requests to
* {@link org.springframework.web.socket.WebSocketHandler WebSocketHandler}s.
* {@link org.springframework.web.socket.WebSocketHandler WebSocketHandler org.springframework.web.socket.WebSocketHandler WebSocketHandlers}.
*
* @author Brian Clozel
* @author Rossen Stoyanchev

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -78,7 +78,7 @@ import org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler;
* <p>Registers a Spring MVC {@link org.springframework.web.servlet.HandlerMapping}
* with order 1 to map HTTP WebSocket handshake requests from STOMP/WebSocket clients.
*
* <p>Registers the following {@link org.springframework.messaging.MessageChannel}s:
* <p>Registers the following {@link org.springframework.messaging.MessageChannel org.springframework.messaging.MessageChannels}:
* <ul>
* <li>"clientInboundChannel" for receiving messages from clients (e.g. WebSocket clients)
* <li>"clientOutboundChannel" for sending messages to clients (e.g. WebSocket clients)

View File

@@ -36,12 +36,13 @@ import org.springframework.web.socket.sockjs.SockJsService;
import org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler;
/**
* Base class for {@link WebSocketHandlerRegistration}s that gathers all the configuration
* Base class for {@link WebSocketHandlerRegistration WebSocketHandlerRegistrations} that gathers all the configuration
* options but allows sub-classes to put together the actual HTTP request mappings.
*
* @author Rossen Stoyanchev
* @author Sebastien Deleuze
* @since 4.0
* @param <M> the mappings type
*/
public abstract class AbstractWebSocketHandlerRegistration<M> implements WebSocketHandlerRegistration {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 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.
@@ -26,7 +26,7 @@ import org.springframework.context.annotation.Import;
/**
* Add this annotation to an {@code @Configuration} class to configure
* processing WebSocket requests:
* processing WebSocket requests. A typical configuration would look like this:
*
* <pre class="code">
* &#064;Configuration

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -33,7 +33,7 @@ import org.springframework.web.socket.server.support.WebSocketHandlerMapping;
import org.springframework.web.util.UrlPathHelper;
/**
* A {@link WebSocketHandlerRegistry} that maps {@link WebSocketHandler}s to URLs for use
* A {@link WebSocketHandlerRegistry} that maps {@link WebSocketHandler WebSocketHandlerRegistry} that maps {@link WebSocketHandlers} to URLs for use
* in a Servlet container.
*
* @author Rossen Stoyanchev

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -233,6 +233,7 @@ public class SockJsServiceRegistration {
}
/**
* Configure allowed {@code Origin} header values.
* @since 4.1.2
*/
protected SockJsServiceRegistration setAllowedOrigins(String... allowedOrigins) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2018 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.
@@ -28,7 +28,7 @@ import org.springframework.web.socket.WebSocketHandler;
public interface WebSocketConfigurer {
/**
* Register {@link WebSocketHandler}s including SockJS fallback options if desired.
* Register {@link WebSocketHandler WebSocketHandlers} including SockJS fallback options if desired.
*/
void registerWebSocketHandlers(WebSocketHandlerRegistry registry);

View File

@@ -30,7 +30,7 @@ public interface WebSocketHandlerRegistration {
/**
* Add more handlers that will share the same configuration (interceptors, SockJS
* config, etc)
* config, etc).
*/
WebSocketHandlerRegistration addHandler(WebSocketHandler handler, String... paths);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -30,6 +30,7 @@ import org.springframework.util.Assert;
*
* @author Rossen Stoyanchev
* @since 4.0
* @param <T> the handler type
*/
public class BeanCreatingHandlerProvider<T> implements BeanFactoryAware {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -155,7 +155,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
}
/**
* Configure a {@link StompEncoder} for encoding STOMP frames
* Configure a {@link StompEncoder} for encoding STOMP frames.
* @since 4.3.5
*/
public void setEncoder(StompEncoder encoder) {
@@ -163,7 +163,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
}
/**
* Configure a {@link StompDecoder} for decoding STOMP frames
* Configure a {@link StompDecoder} for decoding STOMP frames.
* @since 4.3.5
*/
public void setDecoder(StompDecoder decoder) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2018 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.
@@ -24,6 +24,7 @@ import org.springframework.messaging.Message;
*
* @author Rossen Stoyanchev
* @since 4.2
* @param <P> the message payload type
*/
public interface SubProtocolErrorHandler<P> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -28,7 +28,7 @@ import org.springframework.web.socket.WebSocketSession;
/**
* A contract for handling WebSocket messages as part of a higher level protocol,
* referred to as "sub-protocol" in the WebSocket RFC specification. Handles both
* {@link WebSocketMessage}s from a client as well as {@link Message}s to a client.
* {@link WebSocketMessage}s from a client as well as {@link Message WebSocketMessage}s from a client as well as {@link Messages} to a client.
*
* <p>Implementations of this interface can be configured on a
* {@link SubProtocolWebSocketHandler} which selects a sub-protocol handler to

View File

@@ -212,8 +212,8 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
* when connected on the STOMP level after the CONNECTED frame is received.
* @param url the url to connect to
* @param handler the session handler
* @param uriVars URI variables to expand into the URL
* @return ListenableFuture for access to the session when ready for use
* @param uriVars the URI variables to expand into the URL
* @return a ListenableFuture for access to the session when ready for use
*/
public ListenableFuture<StompSession> connect(String url, StompSessionHandler handler, Object... uriVars) {
return connect(url, null, handler, uriVars);
@@ -226,8 +226,8 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
* @param url the url to connect to
* @param handshakeHeaders the headers for the WebSocket handshake
* @param handler the session handler
* @param uriVariables URI variables to expand into the URL
* @return ListenableFuture for access to the session when ready for use
* @param uriVariables the URI variables to expand into the URL
* @return a ListenableFuture for access to the session when ready for use
*/
public ListenableFuture<StompSession> connect(String url, @Nullable WebSocketHttpHeaders handshakeHeaders,
StompSessionHandler handler, Object... uriVariables) {
@@ -244,8 +244,8 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
* @param handshakeHeaders headers for the WebSocket handshake
* @param connectHeaders headers for the STOMP CONNECT frame
* @param handler the session handler
* @param uriVariables URI variables to expand into the URL
* @return ListenableFuture for access to the session when ready for use
* @param uriVariables the URI variables to expand into the URL
* @return a ListenableFuture for access to the session when ready for use
*/
public ListenableFuture<StompSession> connect(String url, @Nullable WebSocketHttpHeaders handshakeHeaders,
@Nullable StompHeaders connectHeaders, StompSessionHandler handler, Object... uriVariables) {
@@ -263,7 +263,7 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
* @param handshakeHeaders the headers for the WebSocket handshake
* @param connectHeaders headers for the STOMP CONNECT frame
* @param sessionHandler the STOMP session handler
* @return ListenableFuture for access to the session when ready for use
* @return a ListenableFuture for access to the session when ready for use
*/
public ListenableFuture<StompSession> connect(URI url, @Nullable WebSocketHttpHeaders handshakeHeaders,
@Nullable StompHeaders connectHeaders, StompSessionHandler sessionHandler) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -79,6 +79,7 @@ public class OriginHandshakeInterceptor implements HandshakeInterceptor {
}
/**
* Return the allowed {@code Origin} header values.
* @since 4.1.5
* @see #setAllowedOrigins
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -28,7 +28,7 @@ import org.springframework.web.socket.handler.ExceptionWebSocketHandlerDecorator
* <p>In a Servlet 3+ container, {@link org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler}
* can be used to invoke this service. The processing servlet, as well as all filters involved,
* must have asynchronous support enabled through the ServletContext API or by adding an
* {@code <async-support>true</async-support>} element to servlet and filter declarations
* <code>&lt;async-support&gt;true&lt;/async-support&gt;</code> element to servlet and filter declarations
* in web.xml.
*
* @author Rossen Stoyanchev

View File

@@ -127,12 +127,10 @@ public class SockJsClient implements WebSocketClient, Lifecycle {
* of each call to {@link SockJsClient#doHandshake(WebSocketHandler, WebSocketHttpHeaders, URI)}
* and also used with other HTTP requests issued as part of that SockJS
* connection, e.g. the initial info request, XHR send or receive requests.
*
* <p>By default if this property is not set, all handshake headers are also
* used for other HTTP requests. Set it if you want only a subset of handshake
* headers (e.g. auth headers) to be used for other HTTP requests.
*
* @param httpHeaderNames HTTP header names
* @param httpHeaderNames the HTTP header names
*/
public void setHttpHeaderNames(@Nullable String... httpHeaderNames) {
this.httpHeaderNames = httpHeaderNames;

View File

@@ -115,7 +115,7 @@ public class UndertowXhrTransport extends AbstractXhrTransport {
/**
* Return Undertow's native HTTP client
* Return Undertow's native HTTP client.
*/
public UndertowClient getHttpClient() {
return this.httpClient;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -30,6 +30,9 @@ import org.springframework.util.Assert;
*/
public class SockJsFrame {
/**
* The charset used by SockJS.
*/
public static final Charset CHARSET = StandardCharsets.UTF_8;
private static final SockJsFrame OPEN_FRAME = new SockJsFrame("o");

View File

@@ -286,6 +286,7 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig
}
/**
* Return if automatic addition of CORS headers has been disabled.
* @since 4.1.2
* @see #setSuppressCors(boolean)
*/
@@ -315,6 +316,7 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig
}
/**
* Return configure allowed {@code Origin} header values.
* @since 4.1.2
* @see #setAllowedOrigins
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2018 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.
@@ -21,7 +21,7 @@ import java.util.Map;
import org.springframework.web.socket.WebSocketHandler;
/**
* A factory for creating a SockJS session. {@link TransportHandler}s typically also serve
* A factory for creating a SockJS session. {@link TransportHandler TransportHandlers} typically also serve
* as SockJS session factories.
*
* @author Rossen Stoyanchev

View File

@@ -53,7 +53,7 @@ import org.springframework.web.socket.sockjs.support.AbstractSockJsService;
* A basic implementation of {@link org.springframework.web.socket.sockjs.SockJsService}
* with support for SPI-based transport handling and session management.
*
* <p>Based on the {@link TransportHandler} SPI. {@link TransportHandler}s may additionally
* <p>Based on the {@link TransportHandler} SPI. {@link TransportHandler TransportHandler} SPI. {@link TransportHandlers} may additionally
* implement the {@link SockJsSessionFactory} and {@link HandshakeHandler} interfaces.
*
* <p>See the {@link AbstractSockJsService} base class for important details on request mapping.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -40,9 +40,11 @@ import org.springframework.web.socket.sockjs.transport.session.StreamingSockJsSe
import org.springframework.web.util.JavaScriptUtils;
/**
* An HTTP {@link TransportHandler} that uses a famous browser document.domain technique:
* <a href="http://stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do">
* http://stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do</a>
* An HTTP {@link TransportHandler} that uses a famous browser
* {@code document.domain technique}. See <a href=
* "http://stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do">
* stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do</a>
* for details.
*
* @author Rossen Stoyanchev
* @since 4.0

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -119,7 +119,7 @@ public abstract class AbstractSockJsSession implements SockJsSession {
/**
* Create a new instance.
* @param id the session ID
* @param config SockJS service configuration options
* @param config the SockJS service configuration options
* @param handler the recipient of SockJS messages
* @param attributes attributes from the HTTP handshake to associate with the WebSocket
* session; the provided attributes are copied, the original map is not used.