attach -> register

This commit is contained in:
Trustin Lee 2012-04-03 22:19:35 +09:00
parent 116054a364
commit 0d8afa7a4c
4 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@ package io.netty.channel;
import java.util.concurrent.ExecutorService;
public interface EventLoop extends ExecutorService {
ChannelFuture attach(Channel channel);
void attach(Channel channel, ChannelFuture future);
ChannelFuture register(Channel channel);
void register(Channel channel, ChannelFuture future);
boolean inEventLoop();
}

View File

@ -46,9 +46,9 @@ public abstract class SingleThreadEventLoop extends AbstractExecutorService impl
});
}
public ChannelFuture attach(Channel channel) {
public ChannelFuture register(Channel channel) {
ChannelFuture future = new DefaultChannelFuture(channel, false);
attach(channel, future);
register(channel, future);
return future;
}

View File

@ -104,7 +104,7 @@ abstract class AbstractNioWorker extends SingleThreadEventLoop {
}
@Override
public void attach(final Channel channel, final ChannelFuture future) {
public void register(final Channel channel, final ChannelFuture future) {
try {
if (channel instanceof NioServerSocketChannel) {
final NioServerSocketChannel ch = (NioServerSocketChannel) channel;

View File

@ -155,7 +155,7 @@ public class SingleThreadEventLoopTest {
}
@Override
public void attach(Channel channel, ChannelFuture future) {
public void register(Channel channel, ChannelFuture future) {
// Untested
}
}