Clean up and Add missing JavaDoc

This commit is contained in:
Trustin Lee 2012-02-29 13:53:26 -08:00
parent c62b47228e
commit 40e7a5d948
4 changed files with 13 additions and 11 deletions

View File

@ -67,5 +67,4 @@ public abstract class AbstractChannelSink implements ChannelSink {
return Channels.failedFuture(pipeline.getChannel(), t);
}
}
}

View File

@ -432,7 +432,6 @@ public interface ChannelPipeline {
*/
ChannelHandlerContext getContext(Class<? extends ChannelHandler> handlerType);
/**
* Sends the specified {@link ChannelEvent} to the first
* {@link ChannelUpstreamHandler} in this pipeline.
@ -442,9 +441,6 @@ public interface ChannelPipeline {
*/
void sendUpstream(ChannelEvent e);
ChannelFuture execute(Runnable task);
/**
* Sends the specified {@link ChannelEvent} to the last
* {@link ChannelDownstreamHandler} in this pipeline.
@ -454,6 +450,12 @@ public interface ChannelPipeline {
*/
void sendDownstream(ChannelEvent e);
/**
* Schedules the specified task to be executed in the I/O thread associated
* with this pipeline's {@link Channel}.
*/
ChannelFuture execute(Runnable task);
/**
* Returns the {@link Channel} that this pipeline is attached to.
*

View File

@ -39,7 +39,8 @@ public interface ChannelSink {
void exceptionCaught(ChannelPipeline pipeline, ChannelEvent e, ChannelPipelineException cause) throws Exception;
/**
* Execute the given {@link Runnable} later in the io-thread. Some implementation may not support his and just execute it directly
* Execute the given {@link Runnable} later in the io-thread.
* Some implementation may not support this and just execute it directly.
*/
ChannelFuture execute(ChannelPipeline pipeline, Runnable task);
}

View File

@ -584,11 +584,6 @@ public class DefaultChannelPipeline implements ChannelPipeline {
}
}
@Override
public ChannelFuture execute(Runnable task) {
return getSink().execute(this, task);
}
@Override
public void sendDownstream(ChannelEvent e) {
DefaultChannelHandlerContext tail = getActualDownstreamContext(this.tail);
@ -655,6 +650,11 @@ public class DefaultChannelPipeline implements ChannelPipeline {
return realCtx;
}
@Override
public ChannelFuture execute(Runnable task) {
return getSink().execute(this, task);
}
protected void notifyHandlerException(ChannelEvent e, Throwable t) {
if (e instanceof ExceptionEvent) {
if (logger.isWarnEnabled()) {