[#872] AbstractNioByteChannel and AbstractNioMessageChannel should be public

This commit is contained in:
Norman Maurer 2012-12-30 12:48:32 +01:00
parent 738d382fbc
commit c80b1bb66e
3 changed files with 14 additions and 3 deletions

View File

@ -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);

View File

@ -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();
}

View File

@ -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)}