Author: markt
Date: Mon Oct 13 11:24:24 2014
New Revision: 1631347
URL: http://svn.apache.org/r1631347
Log:
Fix Java8 Javadoc warnings for javax.websocket package
Modified:
tomcat/trunk/java/javax/websocket/ContainerProvider.java
tomcat/trunk/java/javax/websocket/Endpoint.java
tomcat/trunk/java/javax/websocket/PongMessage.java
tomcat/trunk/java/javax/websocket/RemoteEndpoint.java
tomcat/trunk/java/javax/websocket/Session.java
tomcat/trunk/java/javax/websocket/WebSocketContainer.java
tomcat/trunk/java/javax/websocket/server/HandshakeRequest.java
tomcat/trunk/java/javax/websocket/server/ServerEndpoint.java
tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java
Modified: tomcat/trunk/java/javax/websocket/ContainerProvider.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/ContainerProvider.java?rev=1631347&r1=1631346&r2=1631347&view=diff
==============================================================================
--- tomcat/trunk/java/javax/websocket/ContainerProvider.java (original)
+++ tomcat/trunk/java/javax/websocket/ContainerProvider.java Mon Oct 13
11:24:24 2014
@@ -30,6 +30,8 @@ public abstract class ContainerProvider
/**
* Create a new container used to create outgoing WebSocket connections.
+ *
+ * @return A newly created container.
*/
public static WebSocketContainer getWebSocketContainer() {
WebSocketContainer result = null;
Modified: tomcat/trunk/java/javax/websocket/Endpoint.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/Endpoint.java?rev=1631347&r1=1631346&r2=1631347&view=diff
==============================================================================
--- tomcat/trunk/java/javax/websocket/Endpoint.java (original)
+++ tomcat/trunk/java/javax/websocket/Endpoint.java Mon Oct 13 11:24:24 2014
@@ -22,6 +22,8 @@ public abstract class Endpoint {
* Event that is triggered when a new session starts.
*
* @param session The new session.
+ * @param config The configuration with which the Endpoint was
+ * configured.
*/
public abstract void onOpen(Session session, EndpointConfig config);
@@ -38,8 +40,8 @@ public abstract class Endpoint {
/**
* Event that is triggered when a protocol error occurs.
*
- * @param session The session
- * @param throwable The exception
+ * @param session The session.
+ * @param throwable The exception.
*/
public void onError(Session session, Throwable throwable) {
// NO-OP by default
Modified: tomcat/trunk/java/javax/websocket/PongMessage.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/PongMessage.java?rev=1631347&r1=1631346&r2=1631347&view=diff
==============================================================================
--- tomcat/trunk/java/javax/websocket/PongMessage.java (original)
+++ tomcat/trunk/java/javax/websocket/PongMessage.java Mon Oct 13 11:24:24 2014
@@ -24,7 +24,9 @@ import java.nio.ByteBuffer;
*/
public interface PongMessage {
/**
- * Obtain the payload of the Pong message as a ByteBuffer.
+ * Get the payload of the Pong message..
+ *
+ * @return The payload of the Pong message.
*/
ByteBuffer getApplicationData();
}
Modified: tomcat/trunk/java/javax/websocket/RemoteEndpoint.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/RemoteEndpoint.java?rev=1631347&r1=1631346&r2=1631347&view=diff
==============================================================================
--- tomcat/trunk/java/javax/websocket/RemoteEndpoint.java (original)
+++ tomcat/trunk/java/javax/websocket/RemoteEndpoint.java Mon Oct 13 11:24:24
2014
@@ -29,16 +29,20 @@ public interface RemoteEndpoint {
/**
* Obtain the timeout (in milliseconds) for sending a message
- * asynchronously. A non-positive value means an infinite timeout. The
- * default value is determined by
+ * asynchronously. The default value is determined by
* {@link WebSocketContainer#getDefaultAsyncSendTimeout()}.
+ * @return The current send timeout in milliseconds. A non-positive
+ * value means an infinite timeout.
*/
long getSendTimeout();
/**
- * Set the timeout (in milliseconds) for sending a message
asynchronously. A
- * non-positive value means an infinite timeout. The default value is
- * determined by {@link
WebSocketContainer#getDefaultAsyncSendTimeout()}.
+ * Set the timeout (in milliseconds) for sending a message
+ * asynchronously. The default value is determined by
+ * {@link WebSocketContainer#getDefaultAsyncSendTimeout()}.
+ * @param timeout The new timeout for sending messages asynchronously
+ * in milliseconds. A non-positive value means an
+ * infinite timeout.
*/
void setSendTimeout(long timeout);
@@ -52,9 +56,10 @@ public interface RemoteEndpoint {
void sendText(String text, SendHandler completion);
/**
- * Send the message asynchronously, using the Future to signal to the
client
- * when the message has been sent.
+ * Send the message asynchronously, using the Future to signal to the
+ * client when the message has been sent.
* @param text The text message to send
+ * @return A Future that signals when the message has been sent.
*/
Future<Void> sendText(String text);
@@ -62,6 +67,7 @@ public interface RemoteEndpoint {
* Send the message asynchronously, using the Future to signal to the
client
* when the message has been sent.
* @param data The text message to send
+ * @return A Future that signals when the message has been sent.
*/
Future<Void> sendBinary(ByteBuffer data);
@@ -85,14 +91,16 @@ public interface RemoteEndpoint {
/**
* Send the message, blocking until the message is sent.
* @param text The text message to send.
- * @throws IOException
+ * @throws IOException if an I/O error occurs during the sending of the
+ * message.
*/
void sendText(String text) throws IOException;
/**
* Send the message, blocking until the message is sent.
* @param data The binary message to send
- * @throws IOException
+ * @throws IOException if an I/O error occurs during the sending of the
+ * message.
*/
void sendBinary(ByteBuffer data) throws IOException;
@@ -104,7 +112,8 @@ public interface RemoteEndpoint {
* @param fragment The partial message to send
* @param isLast <code>true</code> if this is the last part of the
* message, otherwise <code>false</code>
- * @throws IOException
+ * @throws IOException if an I/O error occurs during the sending of the
+ * message.
*/
void sendText(String fragment, boolean isLast) throws IOException;
@@ -116,7 +125,8 @@ public interface RemoteEndpoint {
* @param partialByte The partial message to send
* @param isLast <code>true</code> if this is the last part of
the
* message, otherwise <code>false</code>
- * @throws IOException
+ * @throws IOException if an I/O error occurs during the sending of the
+ * message.
*/
void sendBinary(ByteBuffer partialByte, boolean isLast) throws
IOException;
@@ -141,12 +151,17 @@ public interface RemoteEndpoint {
/**
* Obtains the current batching status of the endpoint.
+ *
+ * @return <code>true</code> if batching is enabled, otherwise
+ * <code>false</code>.
*/
boolean getBatchingAllowed();
/**
* Flush any currently batched messages to the remote endpoint. This method
* will block until the flush completes.
+ *
+ * @throws IOException If an I/O error occurs while flushing
*/
void flushBatch() throws IOException;
@@ -156,6 +171,8 @@ public interface RemoteEndpoint {
* will block until that message and this ping has been sent.
*
* @param applicationData The payload for the ping message
+ *
+ * @throws IOException If an I/O error occurs while sending the ping
*/
void sendPing(ByteBuffer applicationData)
throws IOException, IllegalArgumentException;
@@ -166,6 +183,8 @@ public interface RemoteEndpoint {
* will block until that message and this pong has been sent.
*
* @param applicationData The payload for the pong message
+ *
+ * @throws IOException If an I/O error occurs while sending the pong
*/
void sendPong(ByteBuffer applicationData)
throws IOException, IllegalArgumentException;
Modified: tomcat/trunk/java/javax/websocket/Session.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/Session.java?rev=1631347&r1=1631346&r2=1631347&view=diff
==============================================================================
--- tomcat/trunk/java/javax/websocket/Session.java (original)
+++ tomcat/trunk/java/javax/websocket/Session.java Mon Oct 13 11:24:24 2014
@@ -27,7 +27,8 @@ import java.util.Set;
public interface Session extends Closeable {
/**
- * Returns the container that created this session.
+ * Get the container that created this session.
+ * @return the container that created this session.
*/
WebSocketContainer getContainer();
@@ -63,34 +64,40 @@ public interface Session extends Closeab
boolean isOpen();
/**
- * Get the idle timeout for this session in milliseconds. Zero or negative
- * values indicate an infinite timeout.
+ * Get the idle timeout for this session.
+ * @return The current idle timeout for this session in milliseconds. Zero
+ * or negative values indicate an infinite timeout.
*/
long getMaxIdleTimeout();
/**
- * Set the idle timeout for this session in milliseconds. Zero or negative
- * values indicate an infinite timeout.
+ * Set the idle timeout for this session.
+ * @param timeout The new idle timeout for this session in milliseconds.
+ * Zero or negative values indicate an infinite timeout.
*/
- void setMaxIdleTimeout(long seconds);
+ void setMaxIdleTimeout(long timeout);
/**
- * Set the current maximum buffer size (in bytes) for binary messages.
+ * Set the current maximum buffer size for binary messages.
+ * @param max The new maximum buffer size in bytes
*/
void setMaxBinaryMessageBufferSize(int max);
/**
- * Get the current maximum buffer size (in bytes) for binary messages.
+ * Get the current maximum buffer size for binary messages.
+ * @return The current maximum buffer size in bytes
*/
int getMaxBinaryMessageBufferSize();
/**
- * Set the current maximum buffer size (in characters) for text messages.
+ * Set the maximum buffer size for text messages.
+ * @param max The new maximum buffer size in characters.
*/
void setMaxTextMessageBufferSize(int max);
/**
- * Get the current maximum buffer size (in characters) for text messages.
+ * Get the maximum buffer size for text messages.
+ * @return The maximum buffer size in characters.
*/
int getMaxTextMessageBufferSize();
@@ -101,6 +108,7 @@ public interface Session extends Closeab
/**
* Provides a unique identifier for the session. This identifier should not
* be relied upon to be generated from a secure random source.
+ * @return A unique identifier for the session.
*/
String getId();
@@ -109,7 +117,8 @@ public interface Session extends Closeab
* {@link javax.websocket.CloseReason.CloseCodes#NORMAL_CLOSURE} and an
* empty reason phrase.
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs while the WebSocket session
is
+ * being closed.
*/
@Override
void close() throws IOException;
@@ -118,10 +127,12 @@ public interface Session extends Closeab
/**
* Close the connection to the remote end point using the specified code
* and reason phrase.
+ * @param closeReason The reason the WebSocket session is being closed.
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs while the WebSocket session
is
+ * being closed.
*/
- void close(CloseReason closeStatus) throws IOException;
+ void close(CloseReason closeReason) throws IOException;
URI getRequestURI();
@@ -136,7 +147,10 @@ public interface Session extends Closeab
Principal getUserPrincipal();
/**
- * Obtain the set of currently open sessions for the local endpoint that
+ * Obtain the set of open sessions associated with the same local endpoint
+ * as this session.
+ *
+ * @return The set of currently open sessions for the local endpoint that
* this session is associated with.
*/
Set<Session> getOpenSessions();
@@ -146,12 +160,15 @@ public interface Session extends Closeab
* one {@link MessageHandler} may be registered for each message type (text
* or binary, pong messages are never presented as partial messages).
*
- * @param clazz The type of message that the given handler is intended
+ * @param <T> The type of message that the given handler is intended
* for
+ * @param clazz The Class that implements T
* @param handler The message handler for a incoming message
*
* @throws IllegalStateException If a message handler has already been
* registered for the associated message
type
+ *
+ * @since WebSocket 1.1
*/
<T> void addMessageHandler(Class<T> clazz, MessageHandler.Partial<T>
handler)
throws IllegalStateException;
@@ -161,12 +178,15 @@ public interface Session extends Closeab
* one {@link MessageHandler} may be registered for each message type
(text,
* binary, pong).
*
- * @param clazz The type of message that the given handler is intended
+ * @param <T> The type of message that the given handler is intended
* for
+ * @param clazz The Class that implements T
* @param handler The message handler for a incoming message
*
* @throws IllegalStateException If a message handler has already been
* registered for the associated message
type
+ *
+ * @since WebSocket 1.1
*/
<T> void addMessageHandler(Class<T> clazz, MessageHandler.Whole<T> handler)
throws IllegalStateException;
Modified: tomcat/trunk/java/javax/websocket/WebSocketContainer.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/WebSocketContainer.java?rev=1631347&r1=1631346&r2=1631347&view=diff
==============================================================================
--- tomcat/trunk/java/javax/websocket/WebSocketContainer.java (original)
+++ tomcat/trunk/java/javax/websocket/WebSocketContainer.java Mon Oct 13
11:24:24 2014
@@ -23,14 +23,16 @@ import java.util.Set;
public interface WebSocketContainer {
/**
- * Obtain the default timeout (in milliseconds) for sending a message
- * asynchronously. A non-positive value means an infinite timeout.
+ * Get the default timeout for sending a message asynchronously.
+ * @return The current default timeout in milliseconds. A non-positive
value
+ * means an infinite timeout.
*/
long getDefaultAsyncSendTimeout();
/**
- * Set the default timeout (in milliseconds) for sending a message
- * asynchronously. A non-positive value means an infinite timeout.
+ * Set the default timeout for sending a message asynchronously.
+ * @param timeout The new default timeout in milliseconds. A non-positive
+ * value means an infinite timeout.
*/
void setAsyncSendTimeout(long timeout);
@@ -54,6 +56,8 @@ public interface WebSocketContainer {
* @return The WebSocket session for the connection
*
* @throws DeploymentException If the connection can not be established
+ * @throws IOException If an I/O occurred while trying to establish the
+ * connection
*/
Session connectToServer(Endpoint endpoint,
ClientEndpointConfig clientEndpointConfiguration, URI path)
@@ -73,46 +77,55 @@ public interface WebSocketContainer {
* @return The WebSocket session for the connection
*
* @throws DeploymentException If the connection can not be established
+ * @throws IOException If an I/O occurred while trying to establish the
+ * connection
*/
Session connectToServer(Class<? extends Endpoint> endpoint,
ClientEndpointConfig clientEndpointConfiguration, URI path)
throws DeploymentException, IOException;
/**
- * Get the current default session idle timeout in milliseconds. Zero or
- * negative values indicate an infinite timeout.
+ * Get the current default session idle timeout.
+ * @return The current default session idle timeout in milliseconds. Zero
or
+ * negative values indicate an infinite timeout.
*/
long getDefaultMaxSessionIdleTimeout();
/**
- * Set the current default session idle timeout in milliseconds. Zero or
- * negative values indicate an infinite timeout.
+ * Set the default session idle timeout.
+ * @param timeout The new default session idle timeout in milliseconds.
Zero
+ * or negative values indicate an infinite timeout.
*/
void setDefaultMaxSessionIdleTimeout(long timeout);
/**
- * Get the default maximum buffer size (in bytes) for binary messages.
+ * Get the default maximum buffer size for binary messages.
+ * @return The current default maximum buffer size in bytes
*/
int getDefaultMaxBinaryMessageBufferSize();
/**
- * Set the default maximum buffer size (in bytes) for binary messages.
+ * Set the default maximum buffer size for binary messages.
+ * @param max The new default maximum buffer size in bytes
*/
void setDefaultMaxBinaryMessageBufferSize(int max);
/**
- * Get the default maximum buffer size (in characters) for text messages.
+ * Get the default maximum buffer size for text messages.
+ * @return The current default maximum buffer size in characters
*/
int getDefaultMaxTextMessageBufferSize();
/**
- * Set the default maximum buffer size (in characters) for text messages.
+ * Set the default maximum buffer size for text messages.
+ * @param max The new default maximum buffer size in characters
*/
void setDefaultMaxTextMessageBufferSize(int max);
/**
- * Get the set of extensions that are supported by this WebSocket
- * implementation.
+ * Get the installed extensions.
+ * @return The set of extensions that are supported by this WebSocket
+ * implementation.
*/
Set<Extension> getInstalledExtensions();
}
Modified: tomcat/trunk/java/javax/websocket/server/HandshakeRequest.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/server/HandshakeRequest.java?rev=1631347&r1=1631346&r2=1631347&view=diff
==============================================================================
--- tomcat/trunk/java/javax/websocket/server/HandshakeRequest.java (original)
+++ tomcat/trunk/java/javax/websocket/server/HandshakeRequest.java Mon Oct 13
11:24:24 2014
@@ -42,6 +42,8 @@ public interface HandshakeRequest {
/**
* Get the HTTP Session object associated with this request. Object is used
* to avoid a direct dependency on the Servlet API.
+ * @return The javax.servlet.http.HttpSession object associated with this
+ * request, if any.
*/
Object getHttpSession();
Modified: tomcat/trunk/java/javax/websocket/server/ServerEndpoint.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/server/ServerEndpoint.java?rev=1631347&r1=1631346&r2=1631347&view=diff
==============================================================================
--- tomcat/trunk/java/javax/websocket/server/ServerEndpoint.java (original)
+++ tomcat/trunk/java/javax/websocket/server/ServerEndpoint.java Mon Oct 13
11:24:24 2014
@@ -30,6 +30,8 @@ public @interface ServerEndpoint {
/**
* URI or URI-template that the annotated class should be mapped to.
+ * @return The URI or URI-template that the annotated class should be
mapped
+ * to.
*/
String value();
Modified: tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java?rev=1631347&r1=1631346&r2=1631347&view=diff
==============================================================================
--- tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java
(original)
+++ tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java Mon Oct
13 11:24:24 2014
@@ -39,6 +39,7 @@ public interface ServerEndpointConfig ex
/**
* Returns the path at which this WebSocket server endpoint has been
* registered. It may be a path or a level 0 URI template.
+ * @return The registered path
*/
String getPath();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]