attach -> register
This commit is contained in:
parent
116054a364
commit
0d8afa7a4c
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -155,7 +155,7 @@ public class SingleThreadEventLoopTest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attach(Channel channel, ChannelFuture future) {
|
||||
public void register(Channel channel, ChannelFuture future) {
|
||||
// Untested
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user