Add explaination to the javadocs to not call retain() on the request when doing the handshake. Related to [#1508]

This commit is contained in:
Norman Maurer 2013-07-03 06:41:12 +02:00
parent 824bb3419a
commit 328969485c

View File

@ -123,12 +123,15 @@ public abstract class WebSocketServerHandshaker {
}
/**
* Performs the opening handshake
* Performs the opening handshake. When call this method you <strong>MUST NOT</strong> retain the
* {@link FullHttpRequest} which is passed in.
*
* @param channel
* Channel
* Channel
* @param req
* HTTP Request
* HTTP Request
* @return future
* The {@link ChannelFuture} which is notified once the opening handshake completes
*/
public ChannelFuture handshake(Channel channel, FullHttpRequest req) {
return handshake(channel, req, null, channel.newPromise());
@ -137,6 +140,8 @@ public abstract class WebSocketServerHandshaker {
/**
* Performs the opening handshake
*
* When call this method you <strong>MUST NOT</strong> retain the {@link FullHttpRequest} which is passed in.
*
* @param channel
* Channel
* @param req
@ -145,6 +150,8 @@ public abstract class WebSocketServerHandshaker {
* Extra headers to add to the handshake response or {@code null} if no extra headers should be added
* @param promise
* the {@link ChannelPromise} to be notified when the opening handshake is done
* @return future
* the {@link ChannelFuture} which is notified when the opening handshake is done
*/
public final ChannelFuture handshake(Channel channel, FullHttpRequest req,
HttpHeaders responseHeaders, final ChannelPromise promise) {