More javadoc fixes

This commit is contained in:
Norman Maurer 2013-07-14 18:04:33 +02:00
parent 43d22f6d23
commit c20c852602
5 changed files with 35 additions and 0 deletions

View File

@ -84,16 +84,34 @@ public class ChannelDuplexHandler extends ChannelInboundHandlerAdapter implement
ctx.deregister(future);
}
/**
* Calls {@link ChannelHandlerContext#read()} to forward
* to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}.
*
* Sub-classes may override this method to change behavior.
*/
@Override
public void read(ChannelHandlerContext ctx) throws Exception {
ctx.read();
}
/**
* Calls {@link ChannelHandlerContext#write(Object, ChannelPromise)} to forward
* to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}.
*
* Sub-classes may override this method to change behavior.
*/
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
ctx.write(msg, promise);
}
/**
* Calls {@link ChannelHandlerContext#flush()} to forward
* to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}.
*
* Sub-classes may override this method to change behavior.
*/
@Override
public void flush(ChannelHandlerContext ctx) throws Exception {
ctx.flush();

View File

@ -31,6 +31,12 @@ public final class ChannelPromiseAggregator implements ChannelFutureListener {
private Set<ChannelPromise> pendingPromises;
/**
* Instance an new {@link ChannelPromiseAggregator}
*
* @param aggregatePromise the {@link ChannelPromise} to notify
*/
public ChannelPromiseAggregator(ChannelPromise aggregatePromise) {
if (aggregatePromise == null) {
throw new NullPointerException("aggregatePromise");

View File

@ -22,6 +22,11 @@ public final class ChannelPromiseNotifier implements ChannelFutureListener {
private final ChannelPromise[] promises;
/**
* Create a new instance
*
* @param promises the {@link ChannelPromise}s to notify once this {@link ChannelFutureListener} is notified.
*/
public ChannelPromiseNotifier(ChannelPromise... promises) {
if (promises == null) {
throw new NullPointerException("promises");

View File

@ -42,6 +42,9 @@ public abstract class MultithreadEventLoopGroup extends MultithreadEventExecutor
}
}
/**
* @see {@link MultithreadEventExecutorGroup#MultithreadEventExecutorGroup(int, ThreadFactory, Object...)}
*/
protected MultithreadEventLoopGroup(int nThreads, ThreadFactory threadFactory, Object... args) {
super(nThreads == 0? DEFAULT_EVENT_LOOP_THREADS : nThreads, threadFactory, args);
}

View File

@ -243,6 +243,9 @@ public class EmbeddedChannel extends AbstractChannel {
PlatformDependent.throwException(t);
}
/**
* Ensure the {@link Channel} is open and of not throw an exception.
*/
protected final void ensureOpen() {
if (!isOpen()) {
recordException(new ClosedChannelException());