Revert "[#1058] Add Channel/ChannelHandlerContext/ChannelPipeline.isWritable()"

This reverts commit 4e36fbca58.
This commit is contained in:
Norman Maurer 2013-02-22 14:42:32 +01:00
parent 03b7b2d297
commit 12b392b4cc
6 changed files with 0 additions and 41 deletions

View File

@ -133,11 +133,6 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
});
}
@Override
public boolean isWritable() {
return pipeline.isWritable();
}
@Override
public final Integer id() {
return id;

View File

@ -108,11 +108,6 @@ public interface Channel extends AttributeMap, ChannelOutboundInvoker, ChannelPr
*/
boolean isActive();
/**
* Return {@code true} if the outbound buffer of the {@link Channel} is writable.
*/
boolean isWritable();
/**
* Return the {@link ChannelMetadata} of the {@link Channel} which describe the nature of the {@link Channel}.
*/

View File

@ -128,12 +128,6 @@ public interface ChannelHandlerContext
extends AttributeMap, ChannelPropertyAccess,
ChannelInboundInvoker, ChannelOutboundInvoker {
/**
* Return {@link true} if the {@link ChannelHandlerContext} is writable, which means if the outbound buffer of
* the next in the {@link ChannelPipeline} is writable.
*/
boolean isWritable();
/**
* Return the {@link Channel} which is bound to the {@link ChannelHandlerContext}.
*/

View File

@ -732,11 +732,6 @@ public interface ChannelPipeline extends ChannelInboundInvoker, ChannelOutboundI
*/
Map<String, ChannelHandler> toMap();
/**
* Return {@code true} if the outbound buffer is writable.
*/
boolean isWritable();
@Override
ChannelPipeline fireChannelRegistered();

View File

@ -1550,21 +1550,6 @@ final class DefaultChannelHandlerContext extends DefaultAttributeMap implements
return channel().newFailedFuture(cause);
}
@Override
public boolean isWritable() {
DefaultChannelHandlerContext ctx = prev;
for (;;) {
if (ctx.hasOutboundByteBuffer()) {
return ctx.isWritable();
}
if (ctx.hasOutboundMessageBuffer()) {
return ctx.isWritable();
}
ctx = ctx.prev;
}
}
private void validateFuture(ChannelFuture future) {
if (future == null) {
throw new NullPointerException("future");

View File

@ -1358,9 +1358,4 @@ final class DefaultChannelPipeline implements ChannelPipeline {
public Iterator<Map.Entry<String, ChannelHandler>> iterator() {
return toMap().entrySet().iterator();
}
@Override
public boolean isWritable() {
return tail.isWritable();
}
}