diff options
author | Joakim Erdfelt | 2015-04-22 23:10:54 +0000 |
---|---|---|
committer | Joakim Erdfelt | 2015-04-22 23:11:01 +0000 |
commit | ed22d7e0de4709f0a0cefb2090cf247451b0f4de (patch) | |
tree | 69aa23ba329c074670ddf8f7c7912c04fb29b791 /jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket | |
parent | 6ec2a50cae29825bf884e17ed16b85b014702f1f (diff) | |
download | org.eclipse.jetty.project-ed22d7e0de4709f0a0cefb2090cf247451b0f4de.tar.gz org.eclipse.jetty.project-ed22d7e0de4709f0a0cefb2090cf247451b0f4de.tar.xz org.eclipse.jetty.project-ed22d7e0de4709f0a0cefb2090cf247451b0f4de.zip |
464727 - Update Javadoc for Java 8 DocLint
Diffstat (limited to 'jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket')
10 files changed, 50 insertions, 19 deletions
diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/BatchMode.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/BatchMode.java index 10106da433..530cb0b61d 100644 --- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/BatchMode.java +++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/BatchMode.java @@ -21,7 +21,7 @@ package org.eclipse.jetty.websocket.api; import org.eclipse.jetty.websocket.api.extensions.OutgoingFrames; /** - * The possible batch modes when invoking {@link OutgoingFrames#outgoingFrame(Frame, WriteCallback, BatchMode)}. + * The possible batch modes when invoking {@link OutgoingFrames#outgoingFrame(org.eclipse.jetty.websocket.api.extensions.Frame, WriteCallback, BatchMode)}. */ public enum BatchMode { diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/RemoteEndpoint.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/RemoteEndpoint.java index c2a81bd27d..39e3c97b48 100644 --- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/RemoteEndpoint.java +++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/RemoteEndpoint.java @@ -31,11 +31,14 @@ public interface RemoteEndpoint * * @param data * the message to be sent + * @throws IOException + * if unable to send the bytes */ void sendBytes(ByteBuffer data) throws IOException; /** - * Initiates the asynchronous transmission of a binary message. This method returns before the message is transmitted. Developers may use the returned + * Initiates the asynchronous transmission of a binary message. This method returns before the message is + * transmitted. Developers may use the returned * Future object to track progress of the transmission. * * @param data @@ -45,7 +48,8 @@ public interface RemoteEndpoint Future<Void> sendBytesByFuture(ByteBuffer data); /** - * Initiates the asynchronous transmission of a binary message. This method returns before the message is transmitted. Developers may provide a callback to + * Initiates the asynchronous transmission of a binary message. This method returns before the message is + * transmitted. Developers may provide a callback to * be notified when the message has been transmitted or resulted in an error. * * @param data @@ -56,38 +60,54 @@ public interface RemoteEndpoint void sendBytes(ByteBuffer data, WriteCallback callback); /** - * Send a binary message in pieces, blocking until all of the message has been transmitted. The runtime reads the message in order. Non-final pieces are + * Send a binary message in pieces, blocking until all of the message has been transmitted. The runtime reads the + * message in order. Non-final pieces are * sent with isLast set to false. The final piece must be sent with isLast set to true. * * @param fragment * the piece of the message being sent + * @param isLast + * true if this is the last piece of the partial bytes + * @throws IOException + * if unable to send the partial bytes */ void sendPartialBytes(ByteBuffer fragment, boolean isLast) throws IOException; /** - * Send a text message in pieces, blocking until all of the message has been transmitted. The runtime reads the message in order. Non-final pieces are sent + * Send a text message in pieces, blocking until all of the message has been transmitted. The runtime reads the + * message in order. Non-final pieces are sent * with isLast set to false. The final piece must be sent with isLast set to true. * * @param fragment * the piece of the message being sent + * @param isLast + * true if this is the last piece of the partial bytes + * @throws IOException + * if unable to send the partial bytes */ void sendPartialString(String fragment, boolean isLast) throws IOException; /** - * Send a Ping message containing the given application data to the remote endpoint. The corresponding Pong message may be picked up using the + * Send a Ping message containing the given application data to the remote endpoint. The corresponding Pong message + * may be picked up using the * MessageHandler.Pong handler. * * @param applicationData * the data to be carried in the ping request + * @throws IOException + * if unable to send the ping */ void sendPing(ByteBuffer applicationData) throws IOException; /** - * Allows the developer to send an unsolicited Pong message containing the given application data in order to serve as a unidirectional heartbeat for the + * Allows the developer to send an unsolicited Pong message containing the given application data in order to serve + * as a unidirectional heartbeat for the * session. * * @param applicationData * the application data to be carried in the pong response. + * @throws IOException + * if unable to send the pong */ void sendPong(ByteBuffer applicationData) throws IOException; @@ -98,11 +118,14 @@ public interface RemoteEndpoint * * @param text * the message to be sent + * @throws IOException + * if unable to send the text message */ void sendString(String text) throws IOException; /** - * Initiates the asynchronous transmission of a text message. This method may return before the message is transmitted. Developers may use the returned + * Initiates the asynchronous transmission of a text message. This method may return before the message is + * transmitted. Developers may use the returned * Future object to track progress of the transmission. * * @param text @@ -112,7 +135,8 @@ public interface RemoteEndpoint Future<Void> sendStringByFuture(String text); /** - * Initiates the asynchronous transmission of a text message. This method may return before the message is transmitted. Developers may provide a callback to + * Initiates the asynchronous transmission of a text message. This method may return before the message is + * transmitted. Developers may provide a callback to * be notified when the message has been transmitted or resulted in an error. * * @param text @@ -130,7 +154,9 @@ public interface RemoteEndpoint /** * Flushes messages that may have been batched by the implementation. - * @throws IOException if the flush fails + * + * @throws IOException + * if the flush fails * @see #getBatchMode() */ void flush() throws IOException; diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/Session.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/Session.java index 9a06435b07..3d28ecb290 100644 --- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/Session.java +++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/Session.java @@ -26,7 +26,6 @@ import org.eclipse.jetty.websocket.api.annotations.OnWebSocketClose; /** * Session represents an active link of communications with a Remote WebSocket Endpoint. - * <p> */ public interface Session extends Closeable { @@ -82,7 +81,11 @@ public interface Session extends Closeable * Once called, any read/write activity on the websocket from this point will be indeterminate. * <p> * Once the underlying connection has been determined to be closed, the various onClose() events (either - * {@link WebSocketListener#onWebSocketClose(int, String)} or {@link OnWebSocketClose}) will be called on your websocket. + * {@link WebSocketListener#onWebSocketClose(int, String)} or {@link OnWebSocketClose}) will be called on your + * websocket. + * + * @throws IOException + * if unable to disconnect * * @see #close() * @see #close(CloseStatus) diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/UpgradeResponse.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/UpgradeResponse.java index a98a6f39d7..91df0d723b 100644 --- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/UpgradeResponse.java +++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/UpgradeResponse.java @@ -136,13 +136,15 @@ public class UpgradeResponse /** * Issue a forbidden upgrade response. * <p> - * This means that the websocket endpoint was valid, but the conditions to use a WebSocket resulted in a forbidden access. + * This means that the websocket endpoint was valid, but the conditions to use a WebSocket resulted in a forbidden + * access. * <p> * Use this when the origin or authentication is invalid. * * @param message * the short 1 line detail message about the forbidden response * @throws IOException + * if unable to send the forbidden */ public void sendForbidden(String message) throws IOException { diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketListener.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketListener.java index b86095154b..0037b32547 100644 --- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketListener.java +++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketListener.java @@ -66,7 +66,7 @@ public interface WebSocketListener * <p> * This will result in the {@link Session} being closed by the implementing side. * - * @param error + * @param cause * the error that occurred. */ void onWebSocketError(Throwable cause); @@ -74,7 +74,7 @@ public interface WebSocketListener /** * A WebSocket Text frame was received. * - * @param message + * @param message the message */ void onWebSocketText(String message); } diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/annotations/OnWebSocketError.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/annotations/OnWebSocketError.java index e15e1e2e4f..5ef8caa33c 100644 --- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/annotations/OnWebSocketError.java +++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/annotations/OnWebSocketError.java @@ -31,7 +31,6 @@ import org.eclipse.jetty.websocket.api.Session; * <p> * Acceptable method patterns.<br> * Note: <code>methodName</code> can be any name you want to use. - * <p> * <ol> * <li><code>public void methodName({@link Throwable} error)</code></li> * <li><code>public void methodName({@link Session} session, {@link Throwable} error)</code></li> diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/annotations/OnWebSocketFrame.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/annotations/OnWebSocketFrame.java index 4ecbf7716c..7dcae2343b 100644 --- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/annotations/OnWebSocketFrame.java +++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/annotations/OnWebSocketFrame.java @@ -32,8 +32,8 @@ import org.eclipse.jetty.websocket.api.Session; * Acceptable method patterns.<br> * Note: <code>methodName</code> can be any name you want to use. * <ol> - * <li><code>public void methodName({@link Frame} frame)</code></li> - * <li><code>public void methodName({@link Session} session, {@link Frame} frame)</code></li> + * <li><code>public void methodName({@link org.eclipse.jetty.websocket.api.extensions.Frame} frame)</code></li> + * <li><code>public void methodName({@link Session} session, {@link org.eclipse.jetty.websocket.api.extensions.Frame} frame)</code></li> * </ol> */ @Documented diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/Extension.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/Extension.java index c19a3e0df6..4cee100f03 100644 --- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/Extension.java +++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/Extension.java @@ -36,6 +36,7 @@ public interface Extension extends IncomingFrames, OutgoingFrames * The <code>Sec-WebSocket-Extensions</code> name for this extension. * <p> * Also known as the <a href="https://tools.ietf.org/html/rfc6455#section-9.1"><code>extension-token</code> per Section 9.1. Negotiating Extensions</a>. + * @return the name of the extension */ public String getName(); diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/ExtensionConfig.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/ExtensionConfig.java index 1041bc5d74..5036eb7a5b 100644 --- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/ExtensionConfig.java +++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/ExtensionConfig.java @@ -128,6 +128,7 @@ public class ExtensionConfig /** * Copy constructor + * @param copy the extension config to copy */ public ExtensionConfig(ExtensionConfig copy) { diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/util/QuoteUtil.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/util/QuoteUtil.java index faf9674a10..c4931c0a84 100644 --- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/util/QuoteUtil.java +++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/util/QuoteUtil.java @@ -27,7 +27,6 @@ import java.util.NoSuchElementException; * Provide some consistent Http header value and Extension configuration parameter quoting support. * <p> * While QuotedStringTokenizer exists in jetty-util, and works great with http header values, using it in websocket-api is undesired. - * <p> * <ul> * <li>Using QuotedStringTokenizer would introduce a dependency to jetty-util that would need to be exposed via the WebAppContext classloader</li> * <li>ABNF defined extension parameter parsing requirements of RFC-6455 (WebSocket) ABNF, is slightly different than the ABNF parsing defined in RFC-2616 |