trivial javadoc fixes
- fix the formatting of the diagram in ChannelFuture's javadoc - update external link in AutobahnServer - fix various spelling issues
This commit is contained in:
parent
c3c1b4a6d2
commit
6e840d8e62
@ -24,8 +24,8 @@ import io.netty.channel.nio.NioEventLoopGroup;
|
|||||||
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Web Socket echo server for running the <a href="http://www.tavendo.de/autobahn/testsuite.html">autobahn</a> test
|
* A Web Socket echo server for running the
|
||||||
* suite
|
* <a href="http://autobahn.ws/testsuite/">autobahn test suite</a>
|
||||||
*/
|
*/
|
||||||
public class AutobahnServer {
|
public class AutobahnServer {
|
||||||
|
|
||||||
|
@ -44,18 +44,18 @@ import java.util.concurrent.TimeUnit;
|
|||||||
* +---------------------------+
|
* +---------------------------+
|
||||||
* | Completed successfully |
|
* | Completed successfully |
|
||||||
* +---------------------------+
|
* +---------------------------+
|
||||||
* +----> isDone() = <b>true</b> |
|
* +----> isDone() = true |
|
||||||
* +--------------------------+ | | isSuccess() = <b>true</b> |
|
* +--------------------------+ | | isSuccess() = true |
|
||||||
* | Uncompleted | | +===========================+
|
* | Uncompleted | | +===========================+
|
||||||
* +--------------------------+ | | Completed with failure |
|
* +--------------------------+ | | Completed with failure |
|
||||||
* | isDone() = <b>false</b> | | +---------------------------+
|
* | isDone() = false | | +---------------------------+
|
||||||
* | isSuccess() = false |----+----> isDone() = <b>true</b> |
|
* | isSuccess() = false |----+----> isDone() = true |
|
||||||
* | isCancelled() = false | | | cause() = <b>non-null</b> |
|
* | isCancelled() = false | | | cause() = non-null |
|
||||||
* | cause() = null | | +===========================+
|
* | cause() = null | | +===========================+
|
||||||
* +--------------------------+ | | Completed by cancellation |
|
* +--------------------------+ | | Completed by cancellation |
|
||||||
* | +---------------------------+
|
* | +---------------------------+
|
||||||
* +----> isDone() = <b>true</b> |
|
* +----> isDone() = true |
|
||||||
* | isCancelled() = <b>true</b> |
|
* | isCancelled() = true |
|
||||||
* +---------------------------+
|
* +---------------------------+
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
@ -87,15 +87,15 @@ import java.util.concurrent.TimeUnit;
|
|||||||
*
|
*
|
||||||
* <h3>Do not call {@link #await()} inside {@link ChannelHandler}</h3>
|
* <h3>Do not call {@link #await()} inside {@link ChannelHandler}</h3>
|
||||||
* <p>
|
* <p>
|
||||||
* The event handler methods in {@link ChannelHandler} is usually called by
|
* The event handler methods in {@link ChannelHandler} are usually called by
|
||||||
* an I/O thread. If {@link #await()} is called by an event handler
|
* an I/O thread. If {@link #await()} is called by an event handler
|
||||||
* method, which is called by the I/O thread, the I/O operation it is waiting
|
* method, which is called by the I/O thread, the I/O operation it is waiting
|
||||||
* for might never be complete because {@link #await()} can block the I/O
|
* for might never complete because {@link #await()} can block the I/O
|
||||||
* operation it is waiting for, which is a dead lock.
|
* operation it is waiting for, which is a dead lock.
|
||||||
* <pre>
|
* <pre>
|
||||||
* // BAD - NEVER DO THIS
|
* // BAD - NEVER DO THIS
|
||||||
* {@code @Override}
|
* {@code @Override}
|
||||||
* public void channelRead({@link ChannelHandlerContext} ctx, GoodByeMessage msg) {
|
* public void channelRead({@link ChannelHandlerContext} ctx, Object msg) {
|
||||||
* {@link ChannelFuture} future = ctx.channel().close();
|
* {@link ChannelFuture} future = ctx.channel().close();
|
||||||
* future.awaitUninterruptibly();
|
* future.awaitUninterruptibly();
|
||||||
* // Perform post-closure operation
|
* // Perform post-closure operation
|
||||||
@ -104,7 +104,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
*
|
*
|
||||||
* // GOOD
|
* // GOOD
|
||||||
* {@code @Override}
|
* {@code @Override}
|
||||||
* public void channelRead({@link ChannelHandlerContext} ctx, GoodByeMessage msg) {
|
* public void channelRead({@link ChannelHandlerContext} ctx, Object msg) {
|
||||||
* {@link ChannelFuture} future = ctx.channel().close();
|
* {@link ChannelFuture} future = ctx.channel().close();
|
||||||
* future.addListener(new {@link ChannelFutureListener}() {
|
* future.addListener(new {@link ChannelFutureListener}() {
|
||||||
* public void operationComplete({@link ChannelFuture} future) {
|
* public void operationComplete({@link ChannelFuture} future) {
|
||||||
|
@ -410,7 +410,7 @@ public interface ChannelPipeline extends Iterable<Entry<String, ChannelHandler>>
|
|||||||
ChannelPipeline addAfter(ChannelHandlerInvoker invoker, String baseName, String name, ChannelHandler handler);
|
ChannelPipeline addAfter(ChannelHandlerInvoker invoker, String baseName, String name, ChannelHandler handler);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a {@link ChannelHandler}s at the first position of this pipeline.
|
* Inserts {@link ChannelHandler}s at the first position of this pipeline.
|
||||||
*
|
*
|
||||||
* @param handlers the handlers to insert first
|
* @param handlers the handlers to insert first
|
||||||
*
|
*
|
||||||
@ -418,7 +418,7 @@ public interface ChannelPipeline extends Iterable<Entry<String, ChannelHandler>>
|
|||||||
ChannelPipeline addFirst(ChannelHandler... handlers);
|
ChannelPipeline addFirst(ChannelHandler... handlers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a {@link ChannelHandler}s at the first position of this pipeline.
|
* Inserts {@link ChannelHandler}s at the first position of this pipeline.
|
||||||
*
|
*
|
||||||
* @param group the {@link EventExecutorGroup} which will be used to execute the {@link ChannelHandler}s
|
* @param group the {@link EventExecutorGroup} which will be used to execute the {@link ChannelHandler}s
|
||||||
* methods.
|
* methods.
|
||||||
@ -428,7 +428,7 @@ public interface ChannelPipeline extends Iterable<Entry<String, ChannelHandler>>
|
|||||||
ChannelPipeline addFirst(EventExecutorGroup group, ChannelHandler... handlers);
|
ChannelPipeline addFirst(EventExecutorGroup group, ChannelHandler... handlers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a {@link ChannelHandler}s at the first position of this pipeline.
|
* Inserts {@link ChannelHandler}s at the first position of this pipeline.
|
||||||
*
|
*
|
||||||
* @param invoker the {@link ChannelHandlerInvoker} which invokes the {@code handler}s event handler methods
|
* @param invoker the {@link ChannelHandlerInvoker} which invokes the {@code handler}s event handler methods
|
||||||
* @param handlers the handlers to insert first
|
* @param handlers the handlers to insert first
|
||||||
@ -437,7 +437,7 @@ public interface ChannelPipeline extends Iterable<Entry<String, ChannelHandler>>
|
|||||||
ChannelPipeline addFirst(ChannelHandlerInvoker invoker, ChannelHandler... handlers);
|
ChannelPipeline addFirst(ChannelHandlerInvoker invoker, ChannelHandler... handlers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a {@link ChannelHandler}s at the last position of this pipeline.
|
* Inserts {@link ChannelHandler}s at the last position of this pipeline.
|
||||||
*
|
*
|
||||||
* @param handlers the handlers to insert last
|
* @param handlers the handlers to insert last
|
||||||
*
|
*
|
||||||
@ -445,7 +445,7 @@ public interface ChannelPipeline extends Iterable<Entry<String, ChannelHandler>>
|
|||||||
ChannelPipeline addLast(ChannelHandler... handlers);
|
ChannelPipeline addLast(ChannelHandler... handlers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a {@link ChannelHandler}s at the last position of this pipeline.
|
* Inserts {@link ChannelHandler}s at the last position of this pipeline.
|
||||||
*
|
*
|
||||||
* @param group the {@link EventExecutorGroup} which will be used to execute the {@link ChannelHandler}s
|
* @param group the {@link EventExecutorGroup} which will be used to execute the {@link ChannelHandler}s
|
||||||
* methods.
|
* methods.
|
||||||
@ -455,7 +455,7 @@ public interface ChannelPipeline extends Iterable<Entry<String, ChannelHandler>>
|
|||||||
ChannelPipeline addLast(EventExecutorGroup group, ChannelHandler... handlers);
|
ChannelPipeline addLast(EventExecutorGroup group, ChannelHandler... handlers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a {@link ChannelHandler}s at the last position of this pipeline.
|
* Inserts {@link ChannelHandler}s at the last position of this pipeline.
|
||||||
*
|
*
|
||||||
* @param invoker the {@link ChannelHandlerInvoker} which invokes the {@code handler}s event handler methods
|
* @param invoker the {@link ChannelHandlerInvoker} which invokes the {@code handler}s event handler methods
|
||||||
* @param handlers the handlers to insert last
|
* @param handlers the handlers to insert last
|
||||||
|
@ -35,7 +35,7 @@ import io.netty.util.internal.TypeParameterMatcher;
|
|||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* Be aware that depending of the constructor parameters it will release all handled messages by pass them to
|
* Be aware that depending of the constructor parameters it will release all handled messages by passing them to
|
||||||
* {@link ReferenceCountUtil#release(Object)}. In this case you may need to use
|
* {@link ReferenceCountUtil#release(Object)}. In this case you may need to use
|
||||||
* {@link ReferenceCountUtil#retain(Object)} if you pass the object to the next handler in the {@link ChannelPipeline}.
|
* {@link ReferenceCountUtil#retain(Object)} if you pass the object to the next handler in the {@link ChannelPipeline}.
|
||||||
*
|
*
|
||||||
@ -60,7 +60,7 @@ public abstract class SimpleChannelInboundHandler<I> extends ChannelInboundHandl
|
|||||||
/**
|
/**
|
||||||
* Create a new instance which will try to detect the types to match out of the type parameter of the class.
|
* Create a new instance which will try to detect the types to match out of the type parameter of the class.
|
||||||
*
|
*
|
||||||
* @param autoRelease {@code true} if handled messages should be released automatically by pass them to
|
* @param autoRelease {@code true} if handled messages should be released automatically by passing them to
|
||||||
* {@link ReferenceCountUtil#release(Object)}.
|
* {@link ReferenceCountUtil#release(Object)}.
|
||||||
*/
|
*/
|
||||||
protected SimpleChannelInboundHandler(boolean autoRelease) {
|
protected SimpleChannelInboundHandler(boolean autoRelease) {
|
||||||
@ -79,7 +79,7 @@ public abstract class SimpleChannelInboundHandler<I> extends ChannelInboundHandl
|
|||||||
* Create a new instance
|
* Create a new instance
|
||||||
*
|
*
|
||||||
* @param inboundMessageType The type of messages to match
|
* @param inboundMessageType The type of messages to match
|
||||||
* @param autoRelease {@code true} if handled messages should be released automatically by pass them to
|
* @param autoRelease {@code true} if handled messages should be released automatically by passing them to
|
||||||
* {@link ReferenceCountUtil#release(Object)}.
|
* {@link ReferenceCountUtil#release(Object)}.
|
||||||
*/
|
*/
|
||||||
protected SimpleChannelInboundHandler(Class<? extends I> inboundMessageType, boolean autoRelease) {
|
protected SimpleChannelInboundHandler(Class<? extends I> inboundMessageType, boolean autoRelease) {
|
||||||
|
Loading…
Reference in New Issue
Block a user