From c80b1bb66e91e3e0528c8372f8a11af43f73e7de Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Sun, 30 Dec 2012 12:48:32 +0100 Subject: [PATCH] [#872] AbstractNioByteChannel and AbstractNioMessageChannel should be public --- .../channel/socket/nio/AbstractNioByteChannel.java | 4 ++-- .../netty/channel/socket/nio/AbstractNioChannel.java | 11 +++++++++++ .../channel/socket/nio/AbstractNioMessageChannel.java | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/transport/src/main/java/io/netty/channel/socket/nio/AbstractNioByteChannel.java b/transport/src/main/java/io/netty/channel/socket/nio/AbstractNioByteChannel.java index 9594e890c1..cd280d595e 100755 --- a/transport/src/main/java/io/netty/channel/socket/nio/AbstractNioByteChannel.java +++ b/transport/src/main/java/io/netty/channel/socket/nio/AbstractNioByteChannel.java @@ -32,7 +32,7 @@ import java.nio.channels.WritableByteChannel; /** * {@link AbstractNioChannel} base class for {@link Channel}s that operate on bytes. */ -abstract class AbstractNioByteChannel extends AbstractNioChannel { +public abstract class AbstractNioByteChannel extends AbstractNioChannel { /** * Create a new instance @@ -163,7 +163,7 @@ abstract class AbstractNioByteChannel extends AbstractNioChannel { this.future = future; } - public void transfer() { + void transfer() { try { for (;;) { long localWrittenBytes = region.transferTo(wch, writtenBytes); diff --git a/transport/src/main/java/io/netty/channel/socket/nio/AbstractNioChannel.java b/transport/src/main/java/io/netty/channel/socket/nio/AbstractNioChannel.java index bf1bf0d9e9..a0a813bd15 100755 --- a/transport/src/main/java/io/netty/channel/socket/nio/AbstractNioChannel.java +++ b/transport/src/main/java/io/netty/channel/socket/nio/AbstractNioChannel.java @@ -154,8 +154,19 @@ public abstract class AbstractNioChannel extends AbstractChannel { * Special {@link Unsafe} sub-type which allows to access the underlying {@link SelectableChannel} */ public interface NioUnsafe extends Unsafe { + /** + * Return underlying {@link SelectableChannel} + */ SelectableChannel ch(); + + /** + * Finish connect + */ void finishConnect(); + + /** + * Read from underlying {@link SelectableChannel} + */ void read(); } diff --git a/transport/src/main/java/io/netty/channel/socket/nio/AbstractNioMessageChannel.java b/transport/src/main/java/io/netty/channel/socket/nio/AbstractNioMessageChannel.java index b374e8c57e..7d25a0c868 100755 --- a/transport/src/main/java/io/netty/channel/socket/nio/AbstractNioMessageChannel.java +++ b/transport/src/main/java/io/netty/channel/socket/nio/AbstractNioMessageChannel.java @@ -25,7 +25,7 @@ import java.nio.channels.SelectableChannel; /** * {@link AbstractNioChannel} base class for {@link Channel}s that operate on messages. */ -abstract class AbstractNioMessageChannel extends AbstractNioChannel { +public abstract class AbstractNioMessageChannel extends AbstractNioChannel { /** * @see {@link AbstractNioChannel#AbstractNioChannel(Channel, Integer, SelectableChannel, int)}